abs

From ZDoom Wiki
Jump to: navigation, search

This function can be used to return the absolute value of a negative integer.

function int abs (int x)
{
    if (x < 0)
        return -x;

    return x;
}
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox