![]() |
Forum Index : Microcontroller and PC projects : [Help] MMBasic and Inverse Functions
Author | Message | ||||
Yourock17 Newbie ![]() Joined: 09/01/2015 Location: AustraliaPosts: 12 |
Hello, on MMBasic ver. 4.01 is there a way to do trigonometric inverse functions. I am currently trying to use MMBasic to find the angle of a right-angled triangle with the length of two sides on my Colour Maximite. I have read through the manual, but nothing seems to reveal. I then started trying codes that just crashed my program, such as: TAN(Opposite/Adjacent)^-1
Help would be very very appreciated ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6274 |
That's an old version od MM Basic you are using but ATN has been available for a long time. From the manual: ATN( number ) Returns the arctangent value of the argument 'number' in radians. If you need the other inverse trig functions, you can create your own functions: FUNCTION ASIN(x) ASIN=2*ATN(x/(1+SQR(1-x*x))) END FUNCTION FUNCTION ACOS(x) ACOS=1.5708- ASIN(x) END FUNCTION Jim VK7JH MMedit |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |