Klasse MathUtil

java.lang.Object
de.uplanet.lucy.server.auxiliaries.MathUtil

@VelocityCallable("singleton") public final class MathUtil extends Object
  • Felddetails

  • Konstruktordetails

    • MathUtil

      public MathUtil()
  • Methodendetails

    • toInteger

      public int toInteger(Object p_value)
      Cast the given value to integer.

      Valid input types are java.lang.Number, java.lang.Boolean, value holders, or strings (that must not contain decimal grouping symbols).

      Parameter:
      p_value - The value to be cast.
      Gibt zurück:
      The integer value.
      Löst aus:
      ArithmeticException - In case of a range overflow.
      NumberFormatException - If a given string cannot be parsed as an integer.
    • toIntegerVH

      public IValueHolder<?> toIntegerVH(Object p_value)
      Cast the given value to integer and wrap it into a value holder.
      Siehe auch:
    • toInteger

      public Integer toInteger(Object p_value, Integer p_intFallback)
      Cast the given value to integer.
      Parameter:
      p_value - The integer value.
      p_intFallback - The fallback value if p_value is null.
      Gibt zurück:
      The integer value.
      Siehe auch:
    • toIntegerVH

      public IValueHolder<?> toIntegerVH(Object p_value, Integer p_intFallback)
      Cast the given value to integer and wrap it into a value holder.
      Siehe auch:
    • toLong

      public long toLong(Object p_value)
      Cast the given value to long.

      Valid input types are java.lang.Number, java.lang.Boolean, value holders, or strings (that must not contain decimal grouping symbols).

      Parameter:
      p_value - The value to be cast.
      Gibt zurück:
      The long value.
      Löst aus:
      ArithmeticException - In case of a range overflow.
      NumberFormatException - If a given string cannot be parsed as a long.
    • toLongVH

      public IValueHolder<?> toLongVH(Object p_value)
      Cast the given value to long and wrap it into a value holder.
      Siehe auch:
    • toLong

      public Long toLong(Object p_value, Long p_lngFallback)
      Cast the given value to long.
      Parameter:
      p_value - The long value.
      p_lngFallback - The fallback value if p_value is null.
      Gibt zurück:
      The long value.
      Siehe auch:
    • toLongVH

      public IValueHolder<?> toLongVH(Object p_value, Long p_lngFallback)
      Cast the given value to long and wrap it into a value holder.
      Siehe auch:
    • toFloat

      public Float toFloat(Object p_value)
      Cast the given value to float.

      Note: Prefer double over float where possible.

      Valid input types are java.lang.Number, java.lang.Boolean, value holders, or strings (see Float.valueOf(String)).

      Parameter:
      p_value - The value to be cast.
      Gibt zurück:
      The float value.
      Löst aus:
      ArithmeticException - In case of a range overflow.
      NumberFormatException - If a given string cannot be parsed as a float.
    • toFloat

      public Float toFloat(Object p_value, Float p_fltFallback)
      Cast the given value to float.

      Note: Prefer double over float where possible.

      Parameter:
      p_value - The float value.
      p_fltFallback - The fallback value if p_value is null.
      Gibt zurück:
      The float value.
      Siehe auch:
    • toDoubleVH

      public IValueHolder<?> toDoubleVH(Object p_value)
      Cast the given value to double and wrap it into a value holder.
      Siehe auch:
    • toDouble

      public Double toDouble(Object p_value)
      Cast the given value to double.

      Valid input types are java.lang.Number, java.lang.Boolean, value holders, or strings (see Double.valueOf(String)).

      Parameter:
      p_value - The value to be cast.
      Gibt zurück:
      The double value.
      Löst aus:
      ArithmeticException - In case of a range overflow.
      NumberFormatException - If a given string cannot be parsed as a double.
    • toDouble

      public Double toDouble(Object p_value, Double p_dblFallback)
      Cast the given value to double.
      Parameter:
      p_value - The double value.
      p_dblFallback - The fallback value if p_value is null.
      Gibt zurück:
      The double value.
      Siehe auch:
    • toDoubleVH

      public IValueHolder<?> toDoubleVH(Object p_value, Double p_dblFallback)
      Cast the given value to double and wrap it into a value holder.
      Siehe auch:
    • toBigDecimal

      public BigDecimal toBigDecimal(Object p_value)
      Cast the given value to big decimal.

      Valid input types are java.lang.Number, java.lang.Boolean, value holders, or strings.

      Parameter:
      p_value - The value to be cast.
      Gibt zurück:
      The big decimal value.
      Löst aus:
      ArithmeticException - In case of a range overflow.
      NumberFormatException - If a given string cannot be parsed as a big decimal.
    • toBigDecimal

      public BigDecimal toBigDecimal(Object p_value, BigDecimal p_lngFallback)
      Cast the given value to big decimal.
      Parameter:
      p_value - The big decimal value.
      p_lngFallback - The fallback value if p_value is null.
      Gibt zurück:
      The big decimal value.
      Siehe auch:
    • abs

      public int abs(int p_iX)
      Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
      Parameter:
      p_iX - The argument whose absolute value is to be determined.
      Gibt zurück:
      The absolute value.
    • abs

      public long abs(long p_lX)
      Returns the absolute value of a long value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
      Parameter:
      p_lX - The argument whose absolute value is to be determined.
      Gibt zurück:
      The absolute value.
    • abs

      public float abs(float p_fltX)
      Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
      Parameter:
      p_fltX - The argument whose absolute value is to be determined.
      Gibt zurück:
      The absolute value.
    • abs

      public double abs(double p_dblX)
      Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
      Parameter:
      p_dblX - The argument whose absolute value is to be determined.
      Gibt zurück:
      The absolute value.
    • signum

      public int signum(Number p_num)
      Returns the signum function of the argument.
      Parameter:
      p_num - The argument.
      Gibt zurück:
      Zero if the argument is zero, 1 if the argument is greater than zero, -1 if the argument is less than zero.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • ceil

      public double ceil(double p_dbl)
      Returns the smallest double value that is greater than or equal to the argument and is equal to a mathematical integer. Special cases:
      • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
      • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
      • If the argument value is less than zero but greater than -1.0, then the result is negative zero.
      Parameter:
      p_dbl - The value.
      Gibt zurück:
      The smallest (closest to negative infinity) floating-point value that is greater than or equal to the argument and is equal to a mathematical integer. .
    • floor

      public double floor(double p_dbl)
      Returns the largest double value that is less than or equal to the argument and is equal to a mathematical integer. Special cases:
      • If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
      • If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
      Parameter:
      p_dbl - The value.
      Gibt zurück:
      The largest (closest to positive infinity) floating-point value that less than or equal to the argument and is equal to a mathematical integer.
    • roundHalfUp

      public double roundHalfUp(double p_dbl)
      Returns the closest integer to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result. In other words, the result is equal to the value of the expression:
       floor(p_dblX + 0.5d)
       
      Examples:
       roundHalfUp(0)    ->  0.0
       roundHalfUp(0.5)  ->  1.0
       roundHalfUp(-0.5) ->  0.0
       roundHalfUp(1)    ->  1.0
       roundHalfUp(-1)   -> -1.0
       
      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • roundHalfUpAsLong

      public long roundHalfUpAsLong(double p_dbl)
      Returns the closest long to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type long. In other words, the result is equal to the value of the expression:
       (long)floor(p_dblX + 0.5d)
       
      Examples:
       roundHalfUp(0)    ->  0
       roundHalfUp(0.5)  ->  1
       roundHalfUp(-0.5) ->  0
       roundHalfUp(1)    ->  1
       roundHalfUp(-1)   -> -1
       
      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or less than Long.MIN_VALUE, or greater then Long.MAX_VALUE.
    • roundHalfUpAsInt

      public int roundHalfUpAsInt(double p_dbl)
      Returns the closest int to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. In other words, the result is equal to the value of the expression:
       (long)floor(p_dblX + 0.5d)
       
      Examples:
       roundHalfUp(0)    ->  0
       roundHalfUp(0.5)  ->  1
       roundHalfUp(-0.5) ->  0
       roundHalfUp(1)    ->  1
       roundHalfUp(-1)   -> -1
       
      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite, or less than Integer.MIN_VALUE, or greater then Integer.MAX_VALUE.
    • roundHalfAwayFromZero

      public double roundHalfAwayFromZero(double p_dbl)
      Returns the closest integer to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0)    ->  0.0
       roundHalfAwayFromZero(0.5)  ->  1.0
       roundHalfAwayFromZero(-0.5) -> -1.0
       roundHalfAwayFromZero(1)    ->  1.0
       roundHalfAwayFromZero(-1)   -> -1.0
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • roundHalfAwayFromZeroAsLong

      public long roundHalfAwayFromZeroAsLong(double p_dbl)
      Returns the closest long to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0)    ->  0
       roundHalfAwayFromZero(0.5)  ->  1
       roundHalfAwayFromZero(-0.5) -> -1
       roundHalfAwayFromZero(1)    ->  1
       roundHalfAwayFromZero(-1)   -> -1
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite, or less than Long.MIN_VALUE, or greater then Long.MAX_VALUE.
    • roundHalfAwayFromZeroAsInt

      public int roundHalfAwayFromZeroAsInt(double p_dbl)
      Returns the closest int to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0)    ->  0
       roundHalfAwayFromZero(0.5)  ->  1
       roundHalfAwayFromZero(-0.5) -> -1
       roundHalfAwayFromZero(1)    ->  1
       roundHalfAwayFromZero(-1)   -> -1
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite, or less than Integer.MIN_VALUE, or greater then Integer.MAX_VALUE.
    • roundHalfAwayFromZero

      public double roundHalfAwayFromZero(double p_dbl, int p_iPrecision)
      Returns the closest scaled integer to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0.0, 2)     ->    0.0
       roundHalfAwayFromZero(1.0, 2)     ->    1.0
       roundHalfAwayFromZero(-1.0, 2)    ->   -1.0
       roundHalfAwayFromZero(1.255, 2)   ->    1.26
       roundHalfAwayFromZero(-1.255, 2)  ->   -1.26
       roundHalfAwayFromZero(123.5, -2)  ->  100.0
       roundHalfAwayFromZero(-123.5, -2) -> -100.0
       

      Parameter:
      p_dbl - The value to be rounded.
      p_iPrecision - The precision (may be a negative value).
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • roundHalfAwayFromZero

      public BigDecimal roundHalfAwayFromZero(BigDecimal p_bd)
      Returns the closest integer to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0)    ->  0.0
       roundHalfAwayFromZero(0.5)  ->  1.0
       roundHalfAwayFromZero(-0.5) -> -1.0
       roundHalfAwayFromZero(1)    ->  1.0
       roundHalfAwayFromZero(-1)   -> -1.0
       

      Parameter:
      p_bd - The value to be rounded.
      Gibt zurück:
      The rounded value.
    • roundHalfAwayFromZero

      public BigDecimal roundHalfAwayFromZero(BigDecimal p_bd, int p_iPrecision)
      Returns the closest scaled integer to the argument. Negative half values are rounded to the lower value.

      Examples:

       roundHalfAwayFromZero(0.0, 2)     ->    0.0
       roundHalfAwayFromZero(1.0, 2)     ->    1.0
       roundHalfAwayFromZero(-1.0, 2)    ->   -1.0
       roundHalfAwayFromZero(1.255, 2)   ->    1.26
       roundHalfAwayFromZero(-1.255, 2)  ->   -1.26
       roundHalfAwayFromZero(123.5, -2)  ->  100.0
       roundHalfAwayFromZero(-123.5, -2) -> -100.0
       

      Parameter:
      p_bd - The value to be rounded.
      p_iPrecision - The precision (may be a negative value).
      Gibt zurück:
      The rounded value.
    • roundHalfEven

      public double roundHalfEven(double p_dbl)
      Returns the closest integer to the argument. Half values are rounded to the neares even integer.

      Examples:

       roundHalfEven(0)     ->  0.0
       roundHalfEven(1)     ->  1.0
       roundHalfEven(-1)    -> -1.0
       roundHalfEven(0.5)   ->  0.0
       roundHalfEven(-0.5)  ->  0.0
       roundHalfEven(1.5)   ->  2.0
       roundHalfEven(-1.5)  -> -2.0
       roundHalfEven(0.12)  ->  0.0
       roundHalfEven(-0.12) ->  0.0
       roundHalfEven(0.62)  ->  1.0
       roundHalfEven(-0.62) -> -1.0
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • roundHalfEvenAsLong

      public long roundHalfEvenAsLong(double p_dbl)
      Returns the closest integer to the argument. Half values are rounded to the neares even integer.

      Examples:

       roundHalfEven(0)     ->  0
       roundHalfEven(1)     ->  1
       roundHalfEven(-1)    -> -1
       roundHalfEven(0.5)   ->  0
       roundHalfEven(-0.5)  ->  0
       roundHalfEven(1.5)   ->  2
       roundHalfEven(-1.5)  -> -2
       roundHalfEven(0.12)  ->  0
       roundHalfEven(-0.12) ->  0
       roundHalfEven(0.62)  ->  1
       roundHalfEven(-0.62) -> -1
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite, or less than Long.MIN_VALUE, or greater then Long.MAX_VALUE.
    • roundHalfEvenAsInt

      public int roundHalfEvenAsInt(double p_dbl)
      Returns the closest integer to the argument. Half values are rounded to the neares even integer.

      Examples:

       roundHalfEven(0)     ->  0
       roundHalfEven(1)     ->  1
       roundHalfEven(-1)    -> -1
       roundHalfEven(0.5)   ->  0
       roundHalfEven(-0.5)  ->  0
       roundHalfEven(1.5)   ->  2
       roundHalfEven(-1.5)  -> -2
       roundHalfEven(0.12)  ->  0
       roundHalfEven(-0.12) ->  0
       roundHalfEven(0.62)  ->  1
       roundHalfEven(-0.62) -> -1
       

      Parameter:
      p_dbl - The value to be rounded.
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite, or less than Integer.MIN_VALUE, or greater then Integer.MAX_VALUE.
    • roundHalfEven

      public double roundHalfEven(double p_dbl, int p_iPrecision)
      Returns the closest integer to the argument. Half values are rounded to the neares even integer.

      Examples:

       roundHalfEven(0, 2)       ->    0.0
       roundHalfEven(1, 2)       ->    1.0
       roundHalfEven(-1, 2)      ->   -1.0
       roundHalfEven(1.245, 2)   ->    1.24
       roundHalfEven(1.255, 2)   ->    1.26
       roundHalfEven(125.5, -2)  ->  100.0
       roundHalfEven(150, -2)    ->  200.0
       

      Parameter:
      p_dbl - The value to be rounded.
      p_iPrecision - The precision (may be a negative value).
      Gibt zurück:
      The rounded value.
      Löst aus:
      ArithmeticException - If the given value is NaN, or not finite.
    • roundHalfEven

      public BigDecimal roundHalfEven(BigDecimal p_bd)
      Returns the closest integer to the argument. Half values are rounded to the neares even integer.

      Examples:

       roundHalfEven(0)     ->  0.0
       roundHalfEven(1)     ->  1.0
       roundHalfEven(-1)    -> -1.0
       roundHalfEven(0.5)   ->  0.0
       roundHalfEven(-0.5)  ->  0.0
       roundHalfEven(1.5)   ->  2.0
       roundHalfEven(-1.5)  -> -2.0
       roundHalfEven(0.12)  ->  0.0
       roundHalfEven(-0.12) ->  0.0
       roundHalfEven(0.62)  ->  1.0
       roundHalfEven(-0.62) -> -1.0
       

      Parameter:
      p_bd - The value to be rounded.
      Gibt zurück:
      The rounded value.
    • roundHalfEven

      public BigDecimal roundHalfEven(BigDecimal p_bd, int p_iPrecision)
      Returns the closest scaled integer to the argument. Half values are rounded to the neares even scaled integer.

      Examples:

       roundHalfEven(0, 2)       ->    0.0
       roundHalfEven(1, 2)       ->    1.0
       roundHalfEven(-1, 2)      ->   -1.0
       roundHalfEven(1.245, 2)   ->    1.24
       roundHalfEven(1.255, 2)   ->    1.26
       roundHalfEven(125.5, -2)  ->  100.0
       roundHalfEven(150, -2)    ->  200.0
       

      Parameter:
      p_bd - The value to be rounded.
      p_iPrecision - The precision (may be a negative value).
      Gibt zurück:
      The rounded value.
    • add

      public Number add(Number p_numL, Number p_numR)
      Adds two numbers. This method does not check for range overflows.
      Parameter:
      p_numL - The first addend.
      p_numR - The second addend.
      Gibt zurück:
      The sum of the two values.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • sub

      public Number sub(Number p_numL, Number p_numR)
      Subtract two numbers. This method does not check for range overflows.
      Parameter:
      p_numL - The minuend.
      p_numR - The subtrahend.
      Gibt zurück:
      The difference of the two values.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • mult

      public Number mult(Number p_numL, Number p_numR)
      Multiplies two numbers. This method does not check for range overflows.
      Parameter:
      p_numL - The first factor.
      p_numR - The second factor.
      Gibt zurück:
      The product of the two factors.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • div

      public Number div(Number p_numL, Number p_numR)
      Divides one number by another. This method does not check for range overflows.
      Parameter:
      p_numL - The dividend.
      p_numR - The divisor.
      Gibt zurück:
      The quotient, or Double.POSITIVE_INFINITY or Double.NEGATIVE_INFINITY if the divisor is 0.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • idiv

      public int idiv(Number p_numL, Number p_numR)
      Divides the int part of first number by the int part of the second.

      p_numA.intValue() / p_numB.intValue()

      This method does not check for range overflows.

      Parameter:
      p_numL - The dividend.
      p_numR - The divisor.
      Gibt zurück:
      The quotient.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
      Seit:
      Intrexx 5.2.
    • ldiv

      public long ldiv(Number p_numL, Number p_numR)
      Divides the long part of first number by the long part of the second.

      p_numA.longValue() / p_numB.longValue()

      This method does not check for range overflows.

      Parameter:
      p_numL - The dividend.
      p_numR - The divisor.
      Gibt zurück:
      The quotient.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
      Seit:
      Intrexx 5.2.
    • imod

      public int imod(Number p_numL, Number p_numR)
      Calculates the int part of first number modulo the int part of the second.

      p_numA.intValue() % p_numB.intValue()

      This method does not check for range overflows.

      Parameter:
      p_numL - The dividend.
      p_numR - The divisor.
      Gibt zurück:
      The remainder modulo p_numB.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
      Seit:
      Intrexx 5.2.
    • lmod

      public long lmod(Number p_numL, Number p_numR)
      Calculates the long part of first number modulo the long part of the second.

      p_numA.intValue() % p_numB.intValue()

      This method does not check for range overflows.

      Parameter:
      p_numL - The dividend.
      p_numR - The divisor.
      Gibt zurück:
      The remainder modulo p_numB.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
      Seit:
      Intrexx 5.2.
    • log

      public double log(Number p_num)
      Returns the natural logarithm (base e) of the given number as a double.
      Parameter:
      p_num - The numerus.
      Gibt zurück:
      The natural logarithm ln p_num.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • log10

      public double log10(Number p_num)
      Returns the logarithm to base 10 of the given number as a double.
      Parameter:
      p_num - The numerus.
      Gibt zurück:
      The logarithm log10 p_num.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • exp

      public double exp(Number p_numExponent)
      Returns Euler's number e raised to given power as a double.
      Parameter:
      p_numExponent - The exponent.
      Gibt zurück:
      The value ep_numExponent.
      Löst aus:
      IllegalArgumentException - If the given value is null.
    • pow

      public double pow(Number p_numBase, Number p_numExponent)
      Returns the value of the first argument raised to the power of the second argument as a double. This method does not check for range overflows.
      Parameter:
      p_numBase - The first factor.
      p_numExponent - The second factor.
      Gibt zurück:
      The value p_numBasep_numExponent.
      Löst aus:
      IllegalArgumentException - If either of the parameters is null.
    • getPI

      public double getPI()
      Get the value of π, i.e. 3.141592653589793.
      Gibt zurück:
      The value of π
      Seit:
      Intrexx 6.0.
    • rad2deg

      public double rad2deg(Number p_num)
      Convert radians to degrees.
      deg = 180 / π * rad
      Parameter:
      p_num - The angle, in radians.
      Gibt zurück:
      The degree value of the given radian value.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • deg2rad

      public double deg2rad(Number p_num)
      Convert degrees to radians.
      rad = π / 180 * deg
      Gibt zurück:
      The radian value of the given degree value.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • ratio2rad

      public double ratio2rad(Number p_numNum, Number p_numDenom)
      Convert a ratio to radians.
      rad = 2 * π * nom / denom
      Parameter:
      p_numNum - The numerator, e.g. the arc length.
      p_numDenom - The denominator, e.g. the full circle.
      Gibt zurück:
      The radian value that corresponds to the given ratio.
      Löst aus:
      IllegalArgumentException - If one of the given values is null, or if the denominator is 0.
      Seit:
      Intrexx 6.0.
    • sin

      public double sin(Number p_num)
      Get the trigonometric sine of the given angle.
      Parameter:
      p_num - The angle, in radians.
      Gibt zurück:
      The trigonometric sine of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • sinDeg

      public double sinDeg(Number p_num)
      Get the trigonometric sine of the given angle.
      Parameter:
      p_num - The angle, in degrees.
      Gibt zurück:
      The trigonometric sine of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • cos

      public double cos(Number p_num)
      Get the trigonometric cosine of the given angle.
      Parameter:
      p_num - The angle, in radians.
      Gibt zurück:
      The trigonometric cosine of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • cosDeg

      public double cosDeg(Number p_num)
      Get the trigonometric cosine of the given angle.
      Parameter:
      p_num - The angle, in degrees.
      Gibt zurück:
      The trigonometric cosine of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • tan

      public double tan(Number p_num)
      Get the trigonometric tangent of the given angle.
      Parameter:
      p_num - The angle, in radians.
      Gibt zurück:
      The trigonometric tangent of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • tanDeg

      public double tanDeg(Number p_num)
      Get the trigonometric tangent of the given angle.
      Parameter:
      p_num - The angle, in degrees.
      Gibt zurück:
      The trigonometric tangent of the given angle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • circleX

      public double circleX(Number p_numX, Number p_numRadius, Number p_numAngle)
      Calculate the x-coordinate of a point on a ellipse.
      circleX(x, r, φ) := x + r * cos(φ)
      Parameter:
      p_numX - An x offset.
      p_numRadius - The radius.
      p_numAngle - The angle, in radians.
      Gibt zurück:
      The x-coordinate of a point on the circle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • circleXInt

      public int circleXInt(Number p_numX, Number p_numRadius, Number p_numAngle)
      Calculate the x-coordinate of a point on a ellipse.
      circleX(x, r, φ) := x + r * cos(φ)
      Parameter:
      p_numX - An x offset.
      p_numRadius - The radius.
      p_numAngle - The angle, in radians.
      Gibt zurück:
      The x-coordinate of a point on the circle, rounded to the closest integer.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • circleX

      public double circleX(Number p_numX, Number p_numRadius, Number p_numNum, Number p_numDenom)
      Calculate the x-coordinate of a point on a ellipse.
      circleX(x, r, p, q) := x + r * cos(2 * π * p / q)
      Parameter:
      p_numX - An x offset.
      p_numRadius - The radius.
      p_numNum - The numerator, e.g. the arc length.
      p_numDenom - The denominator, e.g. the full circle.
      Gibt zurück:
      The x-coordinate of a point on the circle.
      Löst aus:
      IllegalArgumentException - If one of the given values is null, or if the denominator is 0.
      Seit:
      Intrexx 6.0.
    • circleXInt

      public int circleXInt(Number p_numX, Number p_numRadius, Number p_numNum, Number p_numDenom)
      Calculate the x-coordinate of a point on a ellipse.
      circleX(x, r, p, q) := x + r * cos(2 * π * p / q)
      Parameter:
      p_numX - An x offset.
      p_numRadius - The radius.
      p_numNum - The numerator, e.g. the arc length.
      p_numDenom - The denominator, e.g. the full circle.
      Gibt zurück:
      The x-coordinate of a point on the circle, rounded to the closest integer.
      Löst aus:
      IllegalArgumentException - If one of the given values is null, or if the denominator is 0.
      Seit:
      Intrexx 6.0.
    • circleY

      public double circleY(Number p_numY, Number p_numRadius, Number p_numAngle)
      Calculate the y-coordinate of a point on a ellipse.
      circleY(y, r, φ) := y + r * sin(φ)
      Parameter:
      p_numY - An y offset.
      p_numRadius - The radius.
      p_numAngle - The angle, in radians.
      Gibt zurück:
      The y-coordinate of a point on the circle.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • circleYInt

      public int circleYInt(Number p_numY, Number p_numRadius, Number p_numAngle)
      Calculate the y-coordinate of a point on a ellipse.
      circleY(y, r, φ) := y + r * sin(φ)
      Parameter:
      p_numY - An y offset.
      p_numRadius - The radius.
      p_numAngle - The angle, in radians.
      Gibt zurück:
      The y-coordinate of a point on the circle, rounded to the closest integer.
      Löst aus:
      IllegalArgumentException - If the given value is null.
      Seit:
      Intrexx 6.0.
    • circleY

      public double circleY(Number p_numY, Number p_numRadius, Number p_numNum, Number p_numDenom)
      Calculate the y-coordinate of a point on a ellipse.
      circleY(y, r, p, q) := y + r * sin(2 * π * p / q)
      Parameter:
      p_numY - An y offset.
      p_numRadius - The radius.
      p_numNum - The numerator, e.g. the arc length.
      p_numDenom - The denominator, e.g. the full circle.
      Gibt zurück:
      The y-coordinate of a point on the circle.
      Löst aus:
      IllegalArgumentException - If one of the given values is null, or if the denominator is 0.
      Seit:
      Intrexx 6.0.
    • circleYInt

      public int circleYInt(Number p_numY, Number p_numRadius, Number p_numNum, Number p_numDenom)
      Calculate the y-coordinate of a point on a ellipse.
      circleY(y, r, p, q) := y + r * sin(2 * π * p / q)
      Parameter:
      p_numRadius - The radius.
      p_numNum - The numerator, e.g. the arc length.
      p_numDenom - The denominator, e.g. the full circle.
      Gibt zurück:
      The y-coordinate of a point on the circle, rounded to the closest integer.
      Löst aus:
      IllegalArgumentException - If one of the given values is null, or if the denominator is 0.
      Seit:
      Intrexx 6.0.
    • isNaN

      public boolean isNaN(float p_flt)
      Check if the specified number is a Not-a-Number (NaN) value.
      Parameter:
      p_flt - The number to check.
      Gibt zurück:
      true if the specified number is a Not-a-Number (NaN) value, or false otherwise.
    • isInfinite

      public boolean isInfinite(float p_flt)
      Check if the specified number is infinitely large in magnitude.
      Parameter:
      p_flt - The number to check.
      Gibt zurück:
      true if the specified number is infinitely large in magnitude, or false otherwise.
    • isNaN

      public boolean isNaN(double p_dbl)
      Check if the specified number is a Not-a-Number (NaN) value.
      Parameter:
      p_dbl - The number to check.
      Gibt zurück:
      true if the specified number is a Not-a-Number (NaN) value, or false otherwise.
    • isInfinite

      public boolean isInfinite(double p_dbl)
      Check if the specified number is infinitely large in magnitude.
      Parameter:
      p_dbl - The number to check.
      Gibt zurück:
      true if the specified number is infinitely large in magnitude, or false otherwise.
    • min

      public Number min(Number p_num1, Number p_num2)
      Determine the minimum of the given numbers.
      Parameter:
      p_num1 - The first number.
      p_num2 - The second number.
      Gibt zurück:
      The minimum of the two given numbers.
    • max

      public Number max(Number p_num1, Number p_num2)
      Determine the maximum of the given numbers.
      Parameter:
      p_num1 - The first number.
      p_num2 - The second number.
      Gibt zurück:
      The maximum of the two given numbers.
    • gt

      public boolean gt(Number p_numL, Number p_numR)
      Determine if the first number is greater than the second number.
      Parameter:
      p_numL - The first number.
      p_numR - The second number.
      Gibt zurück:
      true if the first number is greater than the second number, or false otherwise.
    • ge

      public boolean ge(Number p_numL, Number p_numR)
      Determine if the first number is greater or equal as the second number.
      Parameter:
      p_numL - The first number.
      p_numR - The second number.
      Gibt zurück:
      true if the first number is greater or equal as the second number, or false otherwise.
    • lt

      public boolean lt(Number p_numL, Number p_numR)
      Determine if the first number is less than the second number.
      Parameter:
      p_numL - The first number.
      p_numR - The second number.
      Gibt zurück:
      true if the first number is less than the second number, or false otherwise.
    • le

      public boolean le(Number p_numL, Number p_numR)
      Determine if the first number is less or equal the second number.
      Parameter:
      p_numL - The first number.
      p_numR - The second number.
      Gibt zurück:
      true if the first number is less or equal the second number, or false otherwise.
    • getRandomInt

      public int getRandomInt(int p_iMinValue, int p_iMaxValue)
      Parameter:
      p_iMinValue - The inclusive minimum value.
      p_iMaxValue - The exclusive maximum value.
      Gibt zurück:
      An integer random number r from the range p_iMinValue <= r < p_iMaxValue.
      Löst aus:
      IllegalArgumentException - - If p_iMaxValue < p_iMinValue.
    • getRandomLong

      public long getRandomLong(long p_lMinValue, long p_lMaxValue)
      Parameter:
      p_lMinValue - The inclusive minimum value.
      p_lMaxValue - The exclusive maximum value.
      Gibt zurück:
      An integer random number r from the range p_lMinValue <= r < p_lMaxValue.
      Löst aus:
      IllegalArgumentException - - If p_lMaxValue < p_lMinValue.