• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

did you know that cos(90) != 0

 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Math.tan(Math.toRadians(90)) is not NaN.
Math.cos(Math.toRadians(90)) is not 0.0.

57.289961630759144
1.633123935319537E16
-57.28996163075955
1.633123935319537E16
6.123233995736766E-17
6.123233995736766E-17
PostScript: Revised output. Removed confusing labels.
[ May 18, 2003: Message edited by: Marlene Miller ]
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think we have to use toRadian first before we can do any cos, tan, sin
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think we have to use toRadian first before we can do any cos, tan, sin
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I did convert 90 degrees to radians.
Of course the conversion is an approximation to PI/2. It's a rational number. Which is why cos of 90 degrees is not 0.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic