0 Replies Latest reply: Nov 28, 2011 12:54 AM by user8478974 RSS

    Inverse trigonmetric functions and MIDP

      The inverse (arc) trigonometric functions, which are static methods of the java.lang.Math class, are not included in MIDP. This seems arbitrary to me, since MIDP is used in robotics (viz. the SunSPOT), navigation is important in robotics, navigation requires working with angles, and the inverse trigonometric functions are the only functions that return an angle supported by the Math class. For instance, the angle between two vectors can be computed using arctan() or arctan2().

      I have worked around this problem by implementing arctan2 using the CORDIC algorithm (see http://en.wikipedia.org/wiki/CORDIC). Yet, I am still perplexed by the decision of leaving the inverse trigonometric functions out of MIDP. Can anyone provide the rationale? Is there a library class that provide these functions?