目录

round()

例子

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