Hello all,
I am trying to convert a function to generic types. I have got many errors, I tried solving some but I am unable to figure out some mistakes.
The code is available here.
- In the code to compare a float and the type
T
I am converting the type toT
using2. as T
, Is there any alternative to that. - I use powi and powf methods to raise it, but it doesn't work. Is there any trait I need to add to my generic type to work.
Any other inputs are welcome.
Thank you.