2 Replies Latest reply on May 1, 2006 2:18 PM by Kolja1987

    Calculating arc tangent of 0.12 degrees

    Kolja1987
      ActionScript really does know to be annoyed sometimes!

      I'm trying to calculate arc tangent of a number.
      I'm using the following code:

      arctg_mi = Math.atan(Math.PI/180 * 0.12)

      As you can see, I need to calculate arc tangent of 0.12 degrees. Problem is that it just cannot be done. I'm not an expert of mathematics, but it seems that radian system does not behave like degrees system when it comes to arc tangent!
      I used Windows' Calculator, and arc tangent of 0.12 in degrees system is about 6.84, which is right. But when I switch to radian system, then convert 0.12 degrees to radians, and then try to calculate, I get the wrong value. Totally wrong!
      Solution? Either I am so stupid that I missed some ordinary procedure in all of this, or these two systems are not comparable.
      Or do I need to convert the value I get back to degrees system somehow?

      The easiest thing to do would be to switch Flash to degrees system, but that can't be done, so...

      Help, please...