Do you have an IDE, like Borland CBuilder, MS Visual C++, or anything to that effect? If so, usually you can use the help function to search when you're just looking for a function.
Searching cos would probably yield acos as an alternate result.
Do you have an IDE, like Borland CBuilder, MS Visual C++, or anything to that effect? If so, usually you can use the help function to search when you're just looking for a function.
Searching cos would probably yield acos as an alternate result.
I use acos() but, it does not calculate properly
Are you assigning it to an integer variable? Make sure you're using a float.
what do u mean float?
i didn't assign it to anything
I keep getting...
-1.#IND
as my answer
What are you doing with it?
You either need to use it in an expression or assign it to a variable.
float accepts decimal values. Integers, as you know, cannot - int in C++ is the same as a real-life integer where no decimal values are allowed
All of the trig functions in <cmath> use radians, not degrees. Maybe that will help. (?)
Post the code.Originally Posted by MyDestiny