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

Rounds x by truncating the fractional part and returns the result as a fixed-point number.

See the article on Rounding for all rounding 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.1555793730.txt.gz ยท Last modified: 2019/04/20 23:55 by korshun