round 函数

将 _X 四舍五入为最接近的整数

inline float round(
   float _X
) restrict(amp);
inline double round(
   double _X
) restrict(amp);

参数

  • _X
    浮点值

返回值

返回最接近_X的整数

要求

**头文件:**amp_math.h

**命名空间:**Concurrency::precise_math

请参见

参考

Concurrency::precise_math 命名空间