SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Namespace Platform::Math

namespace Platform::Math

Provides basic numeric operations such as trigonometric and logarithmic functions, square root, rounding etc.

Method Summarycollapse
Double abs(Double value)
          Calculates the absolute value of a specified number.
Float abs(Float value)
          Calculates the absolute value of a specified number.
Int abs(Int value)
          Calculates the absolute value of a specified number.
Long abs(Long value)
          Calculates the absolute value of a specified number.
Short abs(Short value)
          Calculates the absolute value of a specified number.
Small abs(Small value)
          Calculates the absolute value of a specified number.
template <typename Type>
Type
abs(Type value)
          Calculates the absolute value of a specified number.
Double acos(Double value)
          Calculates the arc cosine of the specified angle.
Float acos(Float value)
          Calculates the arc cosine of the specified angle.
Double asin(Double value)
          Calculates the arc sine of the specified angle.
Float asin(Float value)
          Calculates the arc sine of the specified angle.
Double atan(Double value)
          Calculates the arc tangent of the specified angle.
Float atan(Float value)
          Calculates the arc tangent of the specified angle.
Double atan2(Double y, Double x)
          Converts rectangular coordinates (x, y) to polar (r, theta).
Float atan2(Float y, Float x)
          Converts rectangular coordinates (x, y) to polar (r, theta).
Double ceil(Double value)
          Returns the smallest integer greater than or equal to the specified floating-point number.
Float ceil(Float value)
          Returns the smallest integer greater than or equal to the specified floating-point number.
Double cos(Double value)
          Calculates the trigonometric cosine of the specified angle.
Float cos(Float value)
          Calculates the trigonometric cosine of the specified angle.
Double cosh(Double value)
          Calculates the hyperbolic cosine of the specified angle.
Float cosh(Float value)
          Calculates the hyperbolic cosine of the specified angle.
Double exp(Double value)
          Returns Euler's number e raised to the specified power.
Float exp(Float value)
          Returns Euler's number e raised to the specified power.
Double floor(Double value)
          Returns the largest integer less than or equal to the specified floating-point number.
Float floor(Float value)
          Returns the largest integer less than or equal to the specified floating-point number.
Double log(Double value)
          Returns the natural (base e) logarithm of a specified number.
Float log(Float value)
          Returns the natural (base e) logarithm of a specified number.
Double log10(Double value)
          Returns the base 10 logarithm of a specified number.
Float log10(Float value)
          Returns the base 10 logarithm of a specified number.
Double log2(Double value)
          Returns the base 2 logarithm of a specified number.
Float log2(Float value)
          Returns the base 2 logarithm of a specified number.
Double pow(Double base, Double exponent)
          Returns a specified number raised to the specified power.
Float pow(Float base, Float exponent)
          Returns a specified number raised to the specified power.
Double rem(Double dividend, Double divisor)
          Returns the floating-point remainder of dividend / divisor.
Float rem(Float dividend, Float divisor)
          Returns the floating-point remainder of dividend / divisor.
Long round(Double value)
          Returns the closest integer to the argument.
Int round(Float value)
          Returns the closest integer to the argument.
template <typename Type>
Int
signOf(Type value)
          Returns the sign of the argument.
Double sin(Double value)
          Calculates the trigonometric sine of the specified angle.
Float sin(Float value)
          Calculates the trigonometric sine of the specified angle.
Double sinh(Double value)
          Calculates the hyperbolic sine of the specified angle.
Float sinh(Float value)
          Calculates the hyperbolic sine of the specified angle.
Double split(Double value, Double* integerPart)
          Splits a floating-point value into fractional and integer parts.
Float split(Float value, Float* integerPart)
          Splits a floating-point value into fractional and integer parts.
Double sqrt(Double value)
          Returns the square root of a specified number.
Float sqrt(Float value)
          Returns the square root of a specified number.
Double tan(Double value)
          Calculates the trigonometric tangent of the specified angle.
Float tan(Float value)
          Calculates the trigonometric tangent of the specified angle.
Double tanh(Double value)
          Calculates the hyperbolic tangent of the specified angle.
Float tanh(Float value)
          Calculates the hyperbolic tangent of the specified angle.
Double toDegrees(Double angleInRadians)
          Converts the specified angle measured in radians to an approximately equivalent angle measured in degrees.
Float toDegrees(Float angleInRadians)
          Converts the specified angle measured in radians to an approximately equivalent angle measured in degrees.
Double toRadians(Double angleInDegrees)
          Converts the specified angle measured in degrees to an approximately equivalent angle measured in radians.
Float toRadians(Float angleInDegrees)
          Converts the specified angle measured in degrees to an approximately equivalent angle measured in radians.

 

Method Detail

abs[nothrow, inline]

Double abs(Double value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[nothrow, inline]

Float abs(Float value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[nothrow, inline]

Int abs(Int value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[nothrow, inline]

Long abs(Long value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[nothrow, inline]

Short abs(Short value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[nothrow, inline]

Small abs(Small value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

abs[inline]

template <typename Type>
Type abs(Type value)

Calculates the absolute value of a specified number.

Parameters:
value - the argument whose absolute value is to be determined
Returns:
the absolute value of the argument

acos[nothrow, inline]

Double acos(Double value)

Calculates the arc cosine of the specified angle.

Parameters:
value - angle measured in radians, where -1 <= value <= 1
Returns:
an angle, theta, measured in radians, such that 0 <= theta <= Pi

acos[nothrow, inline]

Float acos(Float value)

Calculates the arc cosine of the specified angle.

Parameters:
value - angle measured in radians, where -1 <= value <= 1
Returns:
an angle, theta, measured in radians, such that 0 <= theta <= Pi

asin[nothrow, inline]

Double asin(Double value)

Calculates the arc sine of the specified angle.

Parameters:
value - angle measured in radians, where -1 <= value <= 1
Returns:
an angle, theta, measured in radians, such that -Pi/2 <= theta <= Pi/2

asin[nothrow, inline]

Float asin(Float value)

Calculates the arc sine of the specified angle.

Parameters:
value - angle measured in radians, where -1 <= value <= 1
Returns:
an angle, theta, measured in radians, such that -Pi/2 <= theta <= Pi/2

atan[nothrow, inline]

Double atan(Double value)

Calculates the arc tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
an angle, theta, measured in radians, such that -Pi/2 <= theta <= Pi/2

atan[nothrow, inline]

Float atan(Float value)

Calculates the arc tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
an angle, theta, measured in radians, such that -Pi/2 <= theta <= Pi/2

atan2[nothrow, inline]

Double atan2(Double y, Double x)

Converts rectangular coordinates (x, y) to polar (r, theta). This function calculates the angle whose tangent is the quotient of two specified numbers y and x representing a point in the Cartesian plane. The value returned by this function is the angle in the Cartesian plane formed by the x-axis, and a vector starting from the origin, (0, 0), and terminating at the point (x, y).

Parameters:
y - the y (ordinate) coordinate of a point
x - the x (abscissa) coordinate of a point
Returns:
an angle, theta, measured in radians, such that -Pi <= theta <= Pi, and tan(theta) = y/x, where (x, y) is a point in the Cartesian plane. Observe the following:
  • for (x, y) in quadrant 1, 0 < theta < Pi/2
  • for (x, y) in quadrant 2, Pi/2 < theta <= Pi
  • for (x, y) in quadrant 3, -Pi < theta < -Pi/2
  • for (x, y) in quadrant 4, -Pi/2 < theta < 0

atan2[nothrow, inline]

Float atan2(Float y, Float x)

Converts rectangular coordinates (x, y) to polar (r, theta). This function calculates the angle whose tangent is the quotient of two specified numbers y and x representing a point in the Cartesian plane. The value returned by this function is the angle in the Cartesian plane formed by the x-axis, and a vector starting from the origin, (0, 0), and terminating at the point (x, y).

Parameters:
y - the y (ordinate) coordinate of a point
x - the x (abscissa) coordinate of a point
Returns:
an angle, theta, measured in radians, such that -Pi <= theta <= Pi, and tan(theta) = y/x, where (x, y) is a point in the Cartesian plane. Observe the following:
  • for (x, y) in quadrant 1, 0 < theta < Pi/2
  • for (x, y) in quadrant 2, Pi/2 < theta <= Pi
  • for (x, y) in quadrant 3, -Pi < theta < -Pi/2
  • for (x, y) in quadrant 4, -Pi/2 < theta < 0

ceil[nothrow, inline]

Double ceil(Double value)

Returns the smallest integer greater than or equal to the specified floating-point number.

Parameters:
value - a number
Returns:
the smallest integer greater than or equal to value

ceil[nothrow, inline]

Float ceil(Float value)

Returns the smallest integer greater than or equal to the specified floating-point number.

Parameters:
value - a number
Returns:
the smallest integer greater than or equal to value

cos[nothrow, inline]

Double cos(Double value)

Calculates the trigonometric cosine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the cosine of the argument

cos[nothrow, inline]

Float cos(Float value)

Calculates the trigonometric cosine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the cosine of the argument

cosh[nothrow, inline]

Double cosh(Double value)

Calculates the hyperbolic cosine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic cosine of the argument

cosh[nothrow, inline]

Float cosh(Float value)

Calculates the hyperbolic cosine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic cosine of the argument

exp[nothrow, inline]

Double exp(Double value)

Returns Euler's number e raised to the specified power.

Parameters:
value - a number specifying a power
Returns:
the number e raised to the power value

exp[nothrow, inline]

Float exp(Float value)

Returns Euler's number e raised to the specified power.

Parameters:
value - a number specifying a power
Returns:
the number e raised to the power value

floor[nothrow, inline]

Double floor(Double value)

Returns the largest integer less than or equal to the specified floating-point number.

Parameters:
value - a number
Returns:
the largest integer less than or equal to value

floor[nothrow, inline]

Float floor(Float value)

Returns the largest integer less than or equal to the specified floating-point number.

Parameters:
value - a number
Returns:
the largest integer less than or equal to value

log[nothrow, inline]

Double log(Double value)

Returns the natural (base e) logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the natural logarithm of value; that is, ln value or loge value

log[nothrow, inline]

Float log(Float value)

Returns the natural (base e) logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the natural logarithm of value; that is, ln value or loge value

log10[nothrow, inline]

Double log10(Double value)

Returns the base 10 logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the base 10 log of value; that is, log10 value

log10[nothrow, inline]

Float log10(Float value)

Returns the base 10 logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the base 10 log of value; that is, log10 value

log2[nothrow, inline]

Double log2(Double value)

Returns the base 2 logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the base 2 log of value; that is, log2 value

log2[nothrow, inline]

Float log2(Float value)

Returns the base 2 logarithm of a specified number.

Parameters:
value - a number whose logarithm is to be computed
Returns:
the base 2 log of value; that is, log2 value

pow[nothrow, inline]

Double pow(Double base, Double exponent)

Returns a specified number raised to the specified power.

Parameters:
base - a number to be raised to a power
exponent - a number that specifies a power
Returns:
the number base raised to the power exponent

pow[nothrow, inline]

Float pow(Float base, Float exponent)

Returns a specified number raised to the specified power.

Parameters:
base - a number to be raised to a power
exponent - a number that specifies a power
Returns:
the number base raised to the power exponent

rem[nothrow, inline]

Double rem(Double dividend, Double divisor)

Returns the floating-point remainder of dividend / divisor.

Parameters:
dividend - the dividend
divisor - the divisor
Returns:
the remainder when dividend is divided by divisor

rem[nothrow, inline]

Float rem(Float dividend, Float divisor)

Returns the floating-point remainder of dividend / divisor.

Parameters:
dividend - the dividend
divisor - the divisor
Returns:
the remainder when dividend is divided by divisor

round[nothrow, inline]

Long round(Double value)

Returns the closest integer to the argument.

Parameters:
value - a number
Returns:
the closest integer to value

round[nothrow, inline]

Int round(Float value)

Returns the closest integer to the argument.

Parameters:
value - a number
Returns:
the closest integer to value

signOf[inline]

template <typename Type>
Int signOf(Type value)

Returns the sign of the argument.

Parameters:
value - a number
Returns:
-1 if value is < 0, 1 if value is > 0, 0 if value is 0

sin[nothrow, inline]

Double sin(Double value)

Calculates the trigonometric sine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the sine of the argument

sin[nothrow, inline]

Float sin(Float value)

Calculates the trigonometric sine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the sine of the argument

sinh[nothrow, inline]

Double sinh(Double value)

Calculates the hyperbolic sine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic sine of the argument

sinh[nothrow, inline]

Float sinh(Float value)

Calculates the hyperbolic sine of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic sine of the argument

split[nothrow, inline]

Double split(Double value, Double* integerPart)

Splits a floating-point value into fractional and integer parts.

Parameters:
value - a number
integerPart - (output) integer part of value
Returns:
the fractional part of value

split[nothrow, inline]

Float split(Float value, Float* integerPart)

Splits a floating-point value into fractional and integer parts.

Parameters:
value - a number
integerPart - (output) integer part of value
Returns:
the fractional part of value

sqrt[nothrow, inline]

Double sqrt(Double value)

Returns the square root of a specified number.

Parameters:
value - a number
Returns:
the square root of value

sqrt[nothrow, inline]

Float sqrt(Float value)

Returns the square root of a specified number.

Parameters:
value - a number
Returns:
the square root of value

tan[nothrow, inline]

Double tan(Double value)

Calculates the trigonometric tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the tangent of the argument

tan[nothrow, inline]

Float tan(Float value)

Calculates the trigonometric tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the tangent of the argument

tanh[nothrow, inline]

Double tanh(Double value)

Calculates the hyperbolic tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic tangent of the argument

tanh[nothrow, inline]

Float tanh(Float value)

Calculates the hyperbolic tangent of the specified angle.

Parameters:
value - angle measured in radians
Returns:
the hyperbolic tangent of the argument

toDegrees[nothrow, inline]

Double toDegrees(Double angleInRadians)

Converts the specified angle measured in radians to an approximately equivalent angle measured in degrees.

Parameters:
angleInRadians - angle measured in radians
Returns:
the measurement of the specified angle in degrees

toDegrees[nothrow, inline]

Float toDegrees(Float angleInRadians)

Converts the specified angle measured in radians to an approximately equivalent angle measured in degrees.

Parameters:
angleInRadians - angle measured in radians
Returns:
the measurement of the specified angle in degrees

toRadians[nothrow, inline]

Double toRadians(Double angleInDegrees)

Converts the specified angle measured in degrees to an approximately equivalent angle measured in radians.

Parameters:
angleInDegrees - angle measured in degrees
Returns:
the measurement of the specified angle in radians

toRadians[nothrow, inline]

Float toRadians(Float angleInDegrees)

Converts the specified angle measured in degrees to an approximately equivalent angle measured in radians.

Parameters:
angleInDegrees - angle measured in degrees
Returns:
the measurement of the specified angle in radians


SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND