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
Hi, it seems that you may have been able to solve your issue. However, I seem to be running into the same issue that you had, and cannot find any other resources that seem similar to what you experienced. Would it be alright if you shared what you did to solve this issue? Thank you so much.