Siebel eScript Language Reference > Siebel eScript Commands > Math Objects >
Math.cos() Method
This method returns an implementation-dependent approximation of the cosine of the parameter. The parameter is expressed in radians. Syntax
Math.cos(number)
|
|
number |
A numeric literal or numeric variable representing an angle in radians |
Returns
An implementation-dependent approximation of the cosine of number. Usage
The return value is between -1 and 1. NaN is returned if number cannot be converted to a number. The angle can be either positive or negative. To convert degrees to radians, multiply by Math.PI/180. Example
This example finds the length of a roof, given its pitch and the distance of the house from its center to the outside wall. function RoofBtn3_Click () { var pitch; var width; var roof;
pitch = 35; pitch = Math.cos(pitch*(Math.PI/180)); width = 75; width = width / 2; roof = width/pitch;
TheApplication().RaiseErrorText("The length of the roof is " + Clib.rsprintf("%5.2f", roof) + " feet."); }
See Also
Math.acos() Method Math.asin() Method Math.atan() Method Math.atan2() Method Math.sin() Method Math.tan() Method
|