OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

org.ecmascript.object
Class Math

org.ecmascript.object.Object
   |
   +--org.ecmascript.object.Math

public abstract class Math
extends Object
The native browser JavaScript object used to work with mathematical operations.
All methods in this class should be invoked statically.

Note that this object is implemented and supported by the web browser and results of its use may vary.



Field Summary

public static Number
E
Euler's constant (approximately 2.718).
public static Number
LN10
The result of ln(10) (natural logarithm of 10; approximately 2.303).
public static Number
LN2
The result of ln(2) (natural logarithm of 2; approximately 0.693).
public static Number
LOG10E
The result of log10(E) (base 10 logarithm of Euler's constant; approximately 0.434).
public static Number
LOG2E
The result of log2(E) (base 2 logarithm of Euler's constant; approximately 1.443).
public static Number
PI
The value of π (pi; approximately 3.14159).
public static Number
SQRT1_2
The result of the square root of 0.5 (approximately 0.707).
public static Number
SQRT2
The result of the square root of 2 (approximately 1.414).


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Method Summary

public static Number
abs(Number value)
Computes the absolute value of the specified number.
public static Number
acos(Number value)
Computes the arccosine of the specified number.
public static Number
asin(Number value)
Computes the arcsine of the specified number.
public static Number
atan(Number value)
Computes the arctangent of the specified number.
public static Number
atan2(Number x, Number y)
Computes the angle theta between the positive x-axis of a plane and the specified coordinate in the plane.
public static Number
ceil(Number value)
Computes the rounded-up value of the specified number.
public static Number
cos(Number theta)
Computes the cosine of the specified angle.
public static Number
exp(Number value)
Computes the value of E^value (Euler's constant raised to the specified power).
public static Number
floor(Number value)
Computes the rounded-down value of the specified number.
public static Number
log(Number value)
Computes the value of ln(value) (natural logarithm of the specified number).
public static Number
max(Number first, Number second)
Retrieves the largest of the given values.
public static Number
min(Number first, Number second)
Retrieves the smallest of the given values.
public static Number
pow(Number value, Number power)
Computes the value of value^power (the specified value raised to the specified power).
public static Number
random()
Retrieves a value that is greater than or equal to 0 and less than 1.
public static Number
round(Number value)
Retrieves the nearest integer to the specified number.
public static Number
sin(Number theta)
Computes the sine of the specified angle.
public static Number
sqrt(Number value)
Retrieves the square root of the specified number.
public static Number
tan(Number theta)
Computes the tangent of the specified angle.


Field Detail


E

public static Number E

Euler's constant (approximately 2.718).

LN10

public static Number LN10

The result of ln(10) (natural logarithm of 10; approximately 2.303).

LN2

public static Number LN2

The result of ln(2) (natural logarithm of 2; approximately 0.693).

LOG10E

public static Number LOG10E

The result of log10(E) (base 10 logarithm of Euler's constant; approximately 0.434).

LOG2E

public static Number LOG2E

The result of log2(E) (base 2 logarithm of Euler's constant; approximately 1.443).

PI

public static Number PI

The value of π (pi; approximately 3.14159).

SQRT1_2

public static Number SQRT1_2

The result of the square root of 0.5 (approximately 0.707).

SQRT2

public static Number SQRT2

The result of the square root of 2 (approximately 1.414).

Method Detail


abs

public static Number abs(Number value)

Computes the absolute value of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the absolute value of the specified number

acos

public static Number acos(Number value)

Computes the arccosine of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the result between zero and π radians or Number.NaN if the specified number is not in the range -1 through 1

asin

public static Number asin(Number value)

Computes the arcsine of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the result between -π/2 and π/2 radians or Number.NaN if the specified number is not in the range -1 through 1

atan

public static Number atan(Number value)

Computes the arctangent of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the result between -π/2 and π/2 radians
See also:
atan2(Number, Number)

atan2

public static Number atan2(Number x,
                           Number y)

Computes the angle theta between the positive x-axis of a plane and the specified coordinate in the plane.

Parameters:
x  -  the specified x coordinate
y  -  the specified y coordinate
Return:
Number - the result between -π and π radians
See also:
atan(Number)

ceil

public static Number ceil(Number value)

Computes the rounded-up value of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the nearest integer that is equal to or greater than the specified number

cos

public static Number cos(Number theta)

Computes the cosine of the specified angle.

Parameters:
theta  -  the specified angle
Return:
Number - the result in the range -1 through 1

exp

public static Number exp(Number value)

Computes the value of E^value (Euler's constant raised to the specified power).

Parameters:
value  -  the specified number
Return:
Number - the result

floor

public static Number floor(Number value)

Computes the rounded-down value of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the nearest integer that is equal to or less than the specified number

log

public static Number log(Number value)

Computes the value of ln(value) (natural logarithm of the specified number).

Parameters:
value  -  the specified number
Return:
Number - the result or Number.NaN if the specified number is negative

max

public static Number max(Number first,
                         Number second)

Retrieves the largest of the given values.

Parameters:
first  -  the first number
second  -  the second number
Return:
Number - the largest of the given values

min

public static Number min(Number first,
                         Number second)

Retrieves the smallest of the given values.

Parameters:
first  -  the first number
second  -  the second number
Return:
Number - the smallest of the given values

pow

public static Number pow(Number value,
                         Number power)

Computes the value of value^power (the specified value raised to the specified power).

Parameters:
value  -  the value number
power  -  the power number
Return:
Number - the result

random

public static Number random()

Retrieves a value that is greater than or equal to 0 and less than 1.

For a floating point number that is greater than or equal to min and less than max, use:

Math.random() * (max - min) + min

For an integer that is greater than or equal to min and less than or equal to max, use:

Math.floor(Math.random() * (max - min + 1)) + min

Return:
Number - a value that is greater than or equal to 0 and less than 1

round

public static Number round(Number value)

Retrieves the nearest integer to the specified number.

Parameters:
value  -  the specified number
Return:
Number - the nearest integer to the specified number

sin

public static Number sin(Number theta)

Computes the sine of the specified angle.

Parameters:
theta  -  the specified angle
Return:
Number - the result in the range -1 through 1

sqrt

public static Number sqrt(Number value)

Retrieves the square root of the specified number.

Parameters:
value  -  the specified number
Return:
Number - the square root of the specified number or Number.NaN if the specified number is negative

tan

public static Number tan(Number theta)

Computes the tangent of the specified angle.

Parameters:
theta  -  the specified angle
Return:
Number - the result

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2015.07.15 10:12 UTC
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.