用户工具

站点工具


reference:language:trunc

trunc()

例子

double c = trunc(-3.5);  // Sets c to -3
double d = trunc(2.7172);  // Sets d to 2

描述

trunc()返回不大于x绝对值的最近的正数。

语法

trunc(x)

参数

x double, float or int

返回 double

reference/language/trunc.txt · 最后更改: 2023/06/07 04:23 由 127.0.0.1