The Float library contains a set of math functions.
WMLScript Float 库(library)包含一组数学函数。
WMLScript Float Library 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 返回一个数字的平方根 |