Hello. Right now, I am trying to use the cosine function in order to calculate custom values. For some strange reason, whenever I type a value into it, it gives the error “too many arguments in function call” even though I am only giving one variable as an input. I have no idea what’s going on, as it is the correct variable type. Any ideas?
Please post the code that is generating that error, we can’t help you otherwise.
float ChangeX(float Distance, float Bearing) {
return Distance * cos(Bearing * (M_PI / 180));
}
float ChangeY(float Distance, float Bearing) {
return Distance * sin(Bearing * (M_PI / 180));
}
I am using visual studio’s v5 extension for programming. Would this cause anything?
I guess it’s just something on my end. I’ll get it eventually. Thank you though!
Are you sure it’s the cosine function? Based on your description and Jpearman’s test, it looks, sounds, and is, ok.
1 Like