|
Math.h sin syntax error
Im trying to use the math.h sin function but i keep getting a syntax error. Im trying to use trig to figure out how far away our bot is from the target light. Heres what's not working:
int targheight;
float dist;
targheight = 3;
dist = ((int)targheight * float sin(((3.14159 / 2) - ((((((int)TILT_SERVO - 190) * (65 / 124)) * (3.14159 / 180)))))) / float sin(float((((((int)TILT_SERVO - 190) * (65 / 124)) * (3.14159 / 180)));
|