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
TI am converting the type to
2. 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.