ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions

This is an old revision of the document!


Function reference

This is a list of all simple functions in ACSUtils.

Math functions

abs

num abs(num x)

Returns the absolute value of x.

Examples

  abs(1) == 1;

min

num min(num a, num b)

Returns the lesser of two numbers.

max

num max(num a, num b)

Returns the greater of two numbers.

clamp

num clamp(num x, num a, num b)

Limits x between a and b and returns the result.

cmp

int cmp(num a, num b)

Compares two numbers and returns the result:

  • 0 - a and b are equal
  • 1 - a is greater than b
  • -1 - a is less than b
functions.1461520905.txt.gz · Last modified: 2016/04/24 21:01 by korshun