util.Math methods

Methods for the util.Math class.

Table 1. Class methods
Name Description
acos(
   x FLOAT )
  RETURNS FLOAT
Computes the arc cosine of the passed value, measured in radians.
asin(
   x FLOAT )
  RETURNS FLOAT
Computes the arc sine of the passed value, measured in radians.
atan(
   x FLOAT )
  RETURNS FLOAT
Computes the arc tangent of the passed value, measured in radians.
atan2(
   y FLOAT,
   x FLOAT )
  RETURNS FLOAT
Computes the principal value of the arc tangent of y/x
cos(
   x FLOAT )
  RETURNS FLOAT
Computes the cosine of the passed value, measured in radians.
exp(
   x FLOAT )
  RETURNS FLOAT
Computes the base-e exponential of the value passed as parameter.
log(
   x FLOAT )
  RETURNS FLOAT
Computes the natural logarithm of the passed value.
pi()
  RETURNS FLOAT
Returns the FLOAT value of PI.
pow(
   x FLOAT,
   y FLOAT )
  RETURNS FLOAT
Computes the value of x raised to the power y.
rand(
   max INTEGER )
  RETURNS INTEGER
Returns a positive pseudo-random number.
sin(
   x FLOAT )
  RETURNS FLOAT
Computes the sine of the passed value, measured in radians.
sqrt(
   x FLOAT )
  RETURNS FLOAT
Returns the square root of the argument provided.
srand()
Initializes the pseudo-random numbers generator.
tan(
   x FLOAT )
  RETURNS FLOAT
Computes the tangent of the passed value, measured in radians.
toDegrees(
   x FLOAT )
  RETURNS FLOAT
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
toRadians(
   x FLOAT )
  RETURNS FLOAT
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.