• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
wei liu
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which is valid ?Math.cos(56)or Math.cos(Math.toRadians(56))orMath.cos(Math.toDegrees(56))
 
Junilu Lacar
Bartender
Pie
Posts: 7754
61
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic