STANDARD LIBRARY: Float
The Float Library contains eight
functions. Six of these functions perform a variety of mathematic procedures
and the other two functions return information about numeric boundaries
set by the browser.
Of the six WMLScript standard libraries, only the implementation of the
Float Library is considered optional. All eight functions require
that the browser be able to support floatingpoint arithmetic operations.
If the browser does not recognize floatingpoint, then these functions
cannot perform their purpose and they will all return invalid.
The Lang Library contains several functions that perform related
tasks regarding integer and floatingpoint numbers.
The library and function names are case senstive.
The eight functions are:
ceil
Rounds a floatingpoint number up to the next larger integer value.
Syntax: Float.ceil(value)
floor
Rounds a floatingpoint number down to the next smaller integer value.
Syntax: Float.floor(value)
int
Returns the integer portion of a floatingpoint number.
Syntax: Float.int(value)
maxFloat
Returns the largest floatingpoint number supported by the browser.
Syntax: Float.maxFloat( )
minFloat
Returns the smallest nonzero floatingpoint number supported by the browser.
Syntax: Float.minFloat( )
pow
Raises a floatingpoint or integer number up to a power.
Syntax: Float.pow(value,
power)
round
Rounds a floatingpoint number up or down to the nearest integer.
Syntax: Float.ceil(value)
sqrt
Returns the square root of a floatingpoint or integer number.
Syntax: Float.sqrt(value)
Copyright 19992001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information
