Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript Math Object

The Math object is a built-in object that provides basic mathematics functionality and constants.

Methods: JScript Math Object

JScript Math Object abs Method

Determines the absolute value of its numeric argument.

JScript Math Object acos Method

Computes the arccosine of its numeric argument.

JScript Math Object asin Method

Computes the arcsine of its numeric argument.

JScript Math Object atan Method

Computes the arctangent of its numeric argument.

JScript Math Object atan2 Method

Returns the angle (in radians) from the X axis to a point.

JScript Math Object ceil Method

Determines the smallest integer greater than or equal to its numeric argument.

JScript Math Object cos Method

Computes the cosine of its numeric argument.

JScript Math Object exp Method

Computes e to the power of the numeric argument.

JScript Math Object floor Method

Determines the greatest integer that is less than or equal to its numeric argument.

JScript Math Object log Method

Computes the natural logarithm of its numeric argument.

JScript Math Object max Method

Returns the greater of two numeric expressions.

JScript Math Object min Method

Returns the lesser of two numeric expressions.

JScript Math Object pow Method

Returns the value of a base expression taken to a specified power.

JScript Math Object random Method

Returns a pseudo-random number.

JScript Math Object round Method

Rounds the supplied numeric expression to the nearest integer.

JScript Math Object sin Method

Returns the sin of its numeric argument.

JScript Math Object sqrt Method

Returns the square root of a number.

JScript Math Object tan Method

Returns the tangent of its numeric argument.

Properties: JScript Math Object

JScript Math Object E Property

Euler's constant.

JScript Math Object LN2 Property

The natural logarithm of 2.

JScript Math Object LN10 Property

The natural logarithm of 10.

JScript Math Object LOG2E Property

The base 2 logarithm of e.

JScript Math Object LOG10E Property

The base 10 logarithm of e.

JScript Math Object PI Property

The ratio of the circumference of a circle to its diameter.

JScript Math Object SQRT1_2 Property

The square root of 0.5, or 1 divided by the square root of 2.

JScript Math Object SQRT2 Property

The square root of 2.

Syntax: JScript Math Object

Math.[{property | method}]

Arguments: JScript Math Object

property

Name of Math object property.

method

Name of Math object method.

Remarks: JScript Math Object

The Math object cannot be created using the new operator, and gives an error if you attempt to do so. It is created by the scripting engine when the engine is loaded. All of its methods and properties are available to your script at all times.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.