ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:iround

Table of Contents

iround

int iround(fixed x)

Description

Rounds x to the nearest integer and returns the result as an integer.

See the article on Rounding for all rounding modes.

Examples

iround(2.3) -> 2
iround(3.8) -> 4
iround(5.5) -> 6
iround(-2.3) -> -2
iround(-3.8) -> -4
iround(-5.5) -> -5
functions/iround.1492267862.txt.gz ยท Last modified: 2017/04/15 17:51 by korshun