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