getting red line under sqrt and atan in c++ 2010
f_mag= sqrt((fx)^2)+((fy)^2);
theta=atan((fx)/(fy));
Well for power use pow()
function. Also, make sure that fx
and fy
are floats. And include <math.h>
or <cmath>
.
atan is correct now but pow is under red line
What does your call to pow() look like, and what are the types of the variables or values used? Please show the code.