OPmath.h

Globals

Functions

  • OPint OPceil ( OPfloat f )
OPceil - math helper
Calculates the ceiling of a floating point number. For example
if 0.5 is passed as f, then 1 will be returned.
  • OPint OPfloor ( OPfloat f )
OPfloor - math helper
Calculates the floor of a floating point number. For example
if 0.5 is passed as f, then 0 will be returned.
  • OPfloat OPabs ( OPfloat f )
OPabs - math helper
Calculates the absolute value of a floating point number.
  • d64 OPabs ( d64 f )
  • OPfloat OPabsf ( OPfloat f )
OPabsf - math helper
Explicitly calculates the absolute value of a floating point number.
  • OPint OPabsi ( OPint i )
OPabsi - math helper
Calculates the absolute value of an integer number.
  • OPfloat OPsin ( OPfloat f )
OPsin - math helper
Calculates the sine of a floating point number.
  • OPfloat OPcos ( OPfloat f )
OPcos - math helper
Calculates the cosine of a floating point number.
  • OPfloat OPtan ( OPfloat f )
OPtan - math helper
Calculates the tangent of a floating point number.
  • OPfloat OPasin ( OPfloat f )
OPasin - math helper
Calculates the arc sine of a floating point number.
  • OPfloat OPacos ( OPfloat f )
OPacos - math helper
Calculates the arc cosine of a floating point number.
  • OPfloat OPatan ( OPfloat f )
OPatan - math helper
Calculates the arc tangent of a floating point number.
  • OPfloat OPatan2 ( OPfloat x, OPfloat y )
OPatan2 - math helper
Uses the signs of both parameters to determine the quadrant of the return floating point value.
  • OPfloat OPpow ( OPfloat b, OPfloat exp )
OPpow - math helper
Raises b to a power.
  • d64 OPsqrt ( d64 f )
OPsqrt - math helper
Calculates the square root of a floating point number.
  • OPfloat OPlog10 ( OPfloat f )
OPlog10 - math helper
Calculates the base 10 log of a floating point number.
  • OPfloat OPlog2 ( OPfloat f )
OPlog2 - math helper
Calculates the base 2 log of a floating point number.
  • OPfloat OPln ( OPfloat f )
OPln - math helper
Calculates the natural log of a floating point number.
  • OPfloat OPround ( OPfloat f )
OPround - math helper
Returns a rounded number to the nearest whole number.
  • OPint OPnear ( OPfloat value, OPfloat target, OPfloat threshhold )
OPnear - math helper
Determines if a value is within a threashold of another
  • OPfloat OPrandom ( )
OPrandom - math helper
Returns a randomized floating point number.
  • OPfloat OPrandRange ( OPfloat min, OPfloat max )
OPrandom - math helper
Returns a randomized floating point number.