The Float library contains a set of math functions.WMLScript Float 库(library)包含一组数学函数。
The Float library works only on clients that support floating-point numbers. If floating-point numbers are not supported, all functions should return invalid.Float Library 近在支持浮点数字(floating-point)的客户端运行。如果不支持浮点数字,函数将失效。
Function函数Description描述ceil(x)Returns the nearest integer that is not smaller than a specified number返回不小于指定数字的最小整数floor(x)Returns the nearest integer that is not larger than a specified number返回不大于指定数字的最大整数
int(x)Returns the integer part of a specified number返回指定数字的整数部分maxFloat()Returns the largest possible floating-point number返回最大的浮点数字minFloat()Returns the smallest possible floating-point number返回最小的浮点数字pow(x,y)Returns the value of x raised to the power of y返回x的y次访round(x)Rounds a number to the nearest integer返回x四舍五入后的整数sqrt(x)Returns the square root of a number返回一个数字的平方根