ABS


abs( a )
abs "absolute"
a a number

The abs( a ) function is used to return the absolute number of the number given.

To understand what an absolute value is, imagine you are standing at any point on a number line and you want to know how far away from zero you are, no matter which side of zero you are standing (positive or negative). This is why the absolute value will always be a positive number.



For example:

a = abs(5)     --5
b = abs(-42)   --42

c = abs(3.75)  --3.45
d = abs(-6.25) --6.25

357

12 May 2023

Font