none
Cos doesn't work? RRS feed

  • Question

  • On my Calculator I typed cos57.97 and it gave me 0.53036 and etc

    but in small basic it gave me some random number, it says it gets the cosine in radians, but i tried converting but it still doesn't get the answer same as my calculator?

    Saturday, October 30, 2010 12:53 AM

Answers

  • Never Mind :P Figured it out, the angle in Math.Cos(x) (where x is the angle) has to be in radians beforehand.
    Saturday, October 30, 2010 12:56 AM

All replies

  • Never Mind :P Figured it out, the angle in Math.Cos(x) (where x is the angle) has to be in radians beforehand.
    Saturday, October 30, 2010 12:56 AM
  • hello

     

    just tested this and it is ok

    to transform to radian use the pi constant math.pi not 3.14

    good luck

    Sunday, October 31, 2010 6:35 PM
  • Or use the inbuilt functions Math.GetRadians and Math.GetDegrees to convert between radians and degrees.
    Sunday, October 31, 2010 8:31 PM
    Moderator