whats up with Java's Math class ?
hi, Has anyone ever noticed, if you use java's Math class that when, for example you want the sine of 180 it gives you 1.224646 etc... Now, correct me if i'm wrong, but shouldn't the sine of 180 be 0? Does anyone know of any algorithms, or good links, for trigonometric functions when you are dealing with degrees?
As the documentation states, the angle you pass to sin(), cos() etc. is in radians, not degrees. Conviniently it also provides toRadians() if you prefer to work in degrees for some reason.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement