Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Math Object >
Math.ceil() Method
This method returns the smallest integer that is not less than its parameter.
Syntax
Math.ceil(number)
Returns
The smallest integer that is not less than number; if number is an integer, number.
Usage
This method returns the smallest integer that is not less than number. If the argument is already an integer, the result is the argument itself. It returns NaN if number cannot be converted to a number.
Example
The following code fragment generates a random number between 0 and 100 and displays the integer range in which the number falls. Each run of this code produces a different result.
var x = Math.random() * 100;
TheApplication().RaiseErrorText("The number is between " +
Math.floor(x) + " and " + Math.ceil(x) + ".");See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |