absolute difference between numbers

Former Member
Former Member
I'm currently getting values from the accelerometer on a Garmin device.

The number are negative and positive.

What I need to do is find the absolute difference between any two given numbers e.g.

Number1 = -100
Number2 = 100
Number3 = absolute difference 200

in Excel you can use the ABS Function ABS(B2-B3)
in C Sharp there is Math.Abs

Is there anything similar in monkey C - Ive had a search of the documentation and cant find anything?

https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Math.html

Thanks!