ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
functions [2016/04/24 21:01] – created korshunfunctions [2017/03/19 17:50] (current) korshun
Line 1: Line 1:
-====== Function reference ====== +====== All functions ====== 
- +<nspages functions -h1>
-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