I have a function template decalred in the following way as
T A :: Func(T rad, T level); /////A is my class
And I am calling this function template in of my other member functions as
Func<float>(10, 20);
When I put float I get warning as “warning C4305: 'argument' : truncation from 'double' to 'float' “ , but I get the correct answer.
So in order to remove this warning I put Func<double>(10 ,20), the warning is gone but I get a weird answer as -1.#IND instead of 0.523.
Could anyone please tell me what might be the error?
Thanks.
T A :: Func(T rad, T level); /////A is my class
And I am calling this function template in of my other member functions as
Func<float>(10, 20);
When I put float I get warning as “warning C4305: 'argument' : truncation from 'double' to 'float' “ , but I get the correct answer.
So in order to remove this warning I put Func<double>(10 ,20), the warning is gone but I get a weird answer as -1.#IND instead of 0.523.
Could anyone please tell me what might be the error?
Thanks.