Siebel eScript Language Reference > Methods Reference > Mathematical Methods >

Get Ceiling Method


The Get Ceiling method returns the smallest integer that is not less than the value that the number argument contains. If this argument already contains an integer, then this method returns the value of this argument. If it cannot convert the value to a number, then it returns the following value:

NaN

This method uses the same argument as the Get Absolute Value method. For more information, see Table 106.

Format

Math.ceil(number)

Example

The following example creates a random number between 0 and 100 and displays the integer range where 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) + ".");

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.