Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
fabs
From Quake Wiki
float fabs(float val)
Contents
Usage
Gets the absolute value of a number.
Parameters
- val
- The number to get the absolute value of.
Return
The absolute value of the passed number.
Example
// If the offset is large enough, do a special action float offset = crandom() * 5; if (fabs(offset) > 2.5) DoSpecialAction(); spread.x *= offset; spread.y *= offset;