Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Math Object >
Math.cos() Method
This method returns an implementation-dependent approximation of the cosine of the argument. The argument is expressed in radians.
Syntax
Math.cos(number)
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, and Math.tan() Method
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |