float x = 8.22; int rx = round(x); // Sets rx to 8 float y = 9.9; int ry = round(y); // Sets ry to 10 float z = -10.6; int rz = round(z); // Sets rz to -11
计算接近于给定参数的整数值。
round(value)
value float
返回 int