The asin () function in STL returns a single value. If you look at the table of sines, you can see that one sine value corresponds to two different angles, for example, a value of 0.5 corresponds to angles of 30 and 150 degrees. The function returns a value of 30 degrees in radians. How can I get a second angle for this sine? A similar question concerns the acos () function. Questions are certainly more mathematical, but can anyone come across?

    2 answers 2

    Actually, this is a question for grade 7-8. The asin function works for the -90 .. 90 range (in fact, -PI / 2 .. PI / 2, but this is understandable, then I write everything in degrees - this is easier). For the sine, the pair angle is easy to calculate - (180 - value). For cosine - just change sign (the function returns in the range 0..180). All other values ​​can be obtained by adding / subtracting 360 the required number of times.

      for arcsine such a “second” angle will be pi - alpha, and for arc cosine 2pi - alpha. Where alpha is the "first" corner

      • Thank you, otherwise I already broke my head with these inverse trigonometric functions. - some_guy
      • @some_guy is kind of intuitive - DreamChild