ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:iround

Differences

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

Link to this comparison view

Next revision
Previous revision
functions:iround [2017/03/15 16:30] – created korshunfunctions:iround [2019/08/26 21:04] (current) – removed korshun
Line 1: Line 1:
-====== iround ====== 
-{{tag>math rounding}} 
-''int iround(fixed x)'' 
  
-===== Description ===== 
-Returns x rounded to the nearest integer as an integer. 
- 
-See the article on [[:rounding]] for all rounding modes. 
- 
-===== Examples ===== 
-<code> 
-iround(2.3) -> 2 
-iround(3.8) -> 4 
-iround(5.5) -> 6 
-iround(-2.3) -> -2 
-iround(-3.8) -> -4 
-iround(-5.5) -> -5 
-</code> 
functions/iround.1489588241.txt.gz · Last modified: 2017/03/15 16:30 by korshun