jQuery in Action, 2nd edition*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes which is valid ?Math.cos(56)or ....... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "which is valid ?Math.cos(56)or ......." Watch "which is valid ?Math.cos(56)or ......." New topic

which is valid ?Math.cos(56)or .......

wei liu
Ranch Hand

Joined: Dec 06, 2001
Posts: 56
which is valid ?Math.cos(56)or Math.cos(Math.toRadians(56))orMath.cos(Math.toDegrees(56))
Junilu Lacar

Joined: Feb 26, 2001
Posts: 4442

Depends on what the units of 56 are. The API JavaDocs clearly state that the arguments for the trigonometric functions are angles in radians.
(Please bookmark the above link for your future reference -- you'll learn a lot more, a lot faster by trying to look things up yourself)

Junilu - [How to Ask Questions] [How to Answer Questions]
wood burning stoves
subject: which is valid ?Math.cos(56)or .......
Similar Threads
One Question Quiz for Newcomers
Urgent !! solve my problems
Parse data from a file
Math cos wth