ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:randsign

This is an old revision of the document!


Table of Contents

randsign

int randsign()

Description

Returns a random sign (-1 or 1). Shorthand for 2 * Random(0, 1) - 1.

Examples

int speed = randsign() * 10.0;
functions/randsign.1499611380.txt.gz · Last modified: 2017/07/09 17:43 by korshun