Class ReplacementForMath

java.lang.Object
de.inetsoftware.jwebassembly.api.java.lang.ReplacementForMath

class ReplacementForMath extends Object
Replacement methods for the class java.lang.Math.
  • Constructor Details

    • ReplacementForMath

      ReplacementForMath()
  • Method Details

    • sin

      static double sin(double x)
      Replacement for Math.sin(double)
      Parameters:
      x - an angle, in radians.
      Returns:
      the sine of the argument.
    • cos

      static double cos(double x)
      Replacement for Math.cos(double)
      Parameters:
      x - an angle, in radians.
      Returns:
      the cosine of the argument.
    • tan

      static double tan(double x)
      Replacement for Math.tan(double)
      Parameters:
      x - an angle, in radians.
      Returns:
      the tangent of the argument.
    • asin

      static double asin(double x)
      Replacement for Math.asin(double)
      Parameters:
      x - the value.
      Returns:
      the arc sine of the argument.
    • acos

      static double acos(double x)
      Replacement for Math.acos(double)
      Parameters:
      x - the value.
      Returns:
      the arc cosine of the argument.
    • atan

      static double atan(double x)
      Replacement for Math.atan(double)
      Parameters:
      x - the value.
      Returns:
      the arc tangent of the argument.
    • exp

      static double exp(double x)
      Replacement for Math.exp(double)
      Parameters:
      x - the value.
      Returns:
      the value ex
    • log

      static double log(double x)
      Replacement for Math.log(double)
      Parameters:
      x - the value.
      Returns:
      the value ln x
    • log10

      static double log10(double x)
      Replacement for Math.log10(double)
      Parameters:
      x - the value.
      Returns:
      the base 10 logarithm of x
    • sqrt

      static double sqrt(double x)
      Replacement for Math.sqrt(double)
      Parameters:
      x - the value.
      Returns:
      the positive square root of x
    • cbrt

      static double cbrt(double x)
      Replacement for Math.cbrt(double)
      Parameters:
      x - the value.
      Returns:
      the cube root of x
    • IEEEremainder

      static double IEEEremainder(double f1, double f2)
      Parameters:
      f1 - the dividend.
      f2 - the divisor.
      Returns:
      the remainder when f1 is divided by f2.
    • ceil

      static double ceil(double x)
      Replacement for Math.ceil(double)
      Parameters:
      x - the value.
      Returns:
      the smallest (closest to negative infinity) integer value
    • floor

      static double floor(double x)
      Replacement for Math.floor(double)
      Parameters:
      x - the value.
      Returns:
      the largest (closest to positive infinity) integer value
    • rint

      static double rint(double x)
      Replacement for Math.rint(double)
      Parameters:
      x - the value.
      Returns:
      the closest floating-point integer value
    • atan2

      static double atan2(double y, double x)
      Parameters:
      y - the ordinate coordinate
      x - the abscissa coordinate
      Returns:
      the theta component of the point(r, theta)in polar coordinates that corresponds to the point(x, y) in Cartesian coordinates.
    • pow

      static double pow(double a, double b)
      Replacement for Math.pow(double, double)
      Parameters:
      a - the base.
      b - the exponent.
      Returns:
      the value ab.
    • random

      static double random()
      Replacement for Math.random()
      Returns:
      a pseudorandom double greater than or equal 0.0 and less than 1.0.
    • abs

      static double abs(double x)
      Replacement for Math.abs(double)
      Parameters:
      x - the value.
      Returns:
      the absolute value of the argument.
    • abs

      static float abs(float x)
      Replacement for Math.abs(float)
      Parameters:
      x - the value.
      Returns:
      the absolute value of the argument.
    • max

      static double max(double a, double b)
      Replacement for Math.max(double,double)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the larger of a and b.
    • max

      static float max(float a, float b)
      Replacement for Math.max(float,float)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the larger of a and b.
    • min

      static double min(double a, double b)
      Replacement for Math.min(double,double)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the smaller of a and b.
    • min

      static float min(float a, float b)
      Replacement for Math.min(float,float)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the smaller of a and b.
    • sinh

      static double sinh(double x)
      Replacement for Math.sinh(double)
      Parameters:
      x - The number whose hyperbolic sine is to be returned.
      Returns:
      The hyperbolic sine of the argument.
    • cosh

      static double cosh(double x)
      Replacement for Math.cosh(double)
      Parameters:
      x - The number whose hyperbolic cosine is to be returned.
      Returns:
      The hyperbolic cosine of the argument.
    • tanh

      static double tanh(double x)
      Replacement for Math.tanh(double)
      Parameters:
      x - The number whose hyperbolic tangent is to be returned.
      Returns:
      The hyperbolic tangent of the argument.
    • hypot

      static double hypot(double a, double b)
      Parameters:
      a - a value
      b - a value
      Returns:
      sqrt(a2+b2)
    • expm1

      static double expm1(double a, double b)
      Replacement for Math.expm1(double)
      Parameters:
      x - the exponent
      Returns:
      the value ex - 1.
    • log1p

      static double log1p(double a, double b)
      Replacement for Math.log1p(double)
      Parameters:
      x - a value
      Returns:
      the result
    • copySign

      static double copySign(double a, double b)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the result
    • copySign

      static float copySign(float a, float b)
      Parameters:
      a - an argument.
      b - another argument.
      Returns:
      the result