ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:itrunc

This is an old revision of the document!


Table of Contents

itrunc

int itrunc(fixed x)

Description

Rounds x by truncating the fractional part and returns the result as an integer.

See the article on Rounding for all rounding modes.

Examples

itrunc(2.3) -> 2
itrunc(3.8) -> 3
itrunc(5.5) -> 5
itrunc(-2.3) -> -2
itrunc(-3.8) -> -3
itrunc(-5.5) -> -5
functions/itrunc.1566842637.txt.gz ยท Last modified: 2019/08/26 21:03 by korshun