ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:trunc

This is an old revision of the document!


Table of Contents

trunc

fixed trunc(fixed x)

Description

Returns x with the fractional part truncated as a fixed-point number.

See the article on Rounding for all truncing modes.

Examples

trunc(2.3) -> 2.0
trunc(3.8) -> 3.0
trunc(5.5) -> 5.0
trunc(-2.3) -> -2.0
trunc(-3.8) -> -3.0
trunc(-5.5) -> -5.0
functions/trunc.1489588377.txt.gz ยท Last modified: 2017/03/15 16:32 by korshun