Newer Version Available
Math Class
Namespace
Math Fields
The following are fields for Math.
PI
Signature
public static final Double PI
Property Value
Type: Double
Math Methods
The following are methods for Math. All methods are static.
atan2(xCoordinate, yCoordinate)
Signature
public static Decimal atan2(Decimal xCoordinate, Decimal yCoordinate)
Return Value
Type: Decimal
atan2(xCoordinate, yCoordinate)
Signature
public static Double atan2(Double xCoordinate, Double yCoordinate)
Return Value
Type: Double
random()
Signature
public static Double random()
Return Value
Type: Double
round(doubleValue)
Signature
public static Integer round(Double doubleValue)
Parameters
- doubleValue
- Type: Double
Return Value
Type: Integer
round(decimalValue)
Signature
public static Integer round(Decimal decimalValue)
Parameters
- decimalValue
- Type: Decimal
Return Value
Type: Integer
Usage
Note that this rounding mode statistically minimizes cumulative error when applied repeatedly over a sequence of calculations.
Example
roundToLong(decimalValue)
Signature
public static Long roundToLong(Decimal decimalValue)
Parameters
- decimalValue
- Type: Decimal
Return Value
Type: Long
Usage
Note that this rounding mode statistically minimizes cumulative error when applied repeatedly over a sequence of calculations.
Example
tanh(decimalAngle)
Signature
public static Decimal tanh(Decimal decimalAngle)
Parameters
- decimalAngle
- Type: Decimal
Return Value
Type: Decimal
tanh(doubleAngle)
Signature
public static Double tanh(Double doubleAngle)
Parameters
- doubleAngle
- Type: Double
Return Value
Type: Double