ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


new:swap

This is an old revision of the document!


swap

any, any swap(any a, any b)

Returns two variables in reverse order. This function exists to improve readability when swapping the values of two variables.

Examples

Without swap():

int tmp = x;
x = y;
y = tmp;

With swap():

swap(x, y);
x = r1;
y = r2;
new/swap.1567716106.txt.gz ยท Last modified: 2019/09/05 23:41 by korshun