/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { MathInstanceConstants } from "../../types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants"; /** * Instance wrapper for the java.lang.Math class that delegates all method calls to * the corresponding Math method. * *

* Note! Method documentations in this interface are only excerpts. For full documentation, see official java.lang.Math Javadoc *

* *

* An instance of the Sitevision class implementing this interface can be obtained via {@link InstanceCreatorUtil#getMathInstance()}. * See {@link InstanceCreatorUtil} for how to obtain an instance of the InstanceCreatorUtil interface. *

* @author Magnus Lövgren * @since Sitevision 3.1 */ export interface MathInstance extends MathInstanceConstants { /** * The double value that is closer than any other to * e, the base of the natural logarithms. */ E: 2.718281828459045; /** * The double value that is closer than any other to * pi, the ratio of the circumference of a circle to its diameter. */ PI: 3.141592653589793; /** * Returns the trigonometric sine of an angle. * @param anAngleInRadians an angle, in radians. * @return the sine of the argument. */ sin(anAngleInRadians: number): number; /** * Returns the trigonometric cosine of an angle. * @param anAngleInRadians an angle, in radians. * @return the cosine of the argument. */ cos(anAngleInRadians: number): number; /** * Returns the trigonometric tangent of an angle. * @param anAngleInRadians an angle, in radians. * @return the tangent of the argument. */ tan(anAngleInRadians: number): number; /** * Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2. * @param aValue the value whose arc sine is to be returned. * @return the arc sine of the argument. */ asin(aValue: number): number; /** * Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi. * @param aValue the value whose arc cosine is to be returned. * @return the arc cosine of the argument. */ acos(aValue: number): number; /** * Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2. * @param aValue the value whose arc tangent is to be returned. * @return the arc tangent of the argument. */ atan(aValue: number): number; /** * Converts an angle measured in degrees to an approximately equivalent angle measured in radians. * @param anAngleInDegrees an angle, in degrees * @return the measurement of the angle anAngleInDegrees in radians. */ toRadians(anAngleInDegrees: number): number; /** * Converts an angle measured in radians to an approximately equivalent angle measured in degrees. * @param anAngleInRadians an angle, in radians * @return the measurement of the angle anAngleInRadians in degrees. */ toDegrees(anAngleInRadians: number): number; /** * Returns Euler's number e raised to the power of a double value. * @param anExponent the exponent to raise e to. * @return the value eanExponent, where e is the base of the natural logarithms. */ exp(anExponent: number): number; /** * Returns the natural logarithm (base e) of a double value. * @param aValue a value * @return the value ln aValue, the natural logarithm of aValue. */ log(aValue: number): number; /** * Returns the base 10 logarithm of a double value. * @param aValue a value * @return the base 10 logarithm of aValue. */ log10(aValue: number): number; /** * Returns the correctly rounded positive square root of a double value. * @param aValue a value. * @return the positive square root of aValue. If the argument is NaN or less than zero, the result is NaN. */ sqrt(aValue: number): number; /** * Returns the cube root of a double value. * @param aValue a value. * @return the cube root of aValue. */ cbrt(aValue: number): number; /** * Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. * @param aDividend the dividend. * @param aDivisor the divisor. * @return the remainder when aDividend is divided by aDivisor. */ IEEEremainder(aDividend: number, aDivisor: number): number; /** * Returns the smallest (closest to negative infinity) double value that is greater than * or equal to the argument and is equal to a mathematical integer. * @param aValue a value. * @return 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. */ ceil(aValue: number): number; /** * Returns the largest (closest to positive infinity) double value that is less than * or equal to the argument and is equal to a mathematical integer. * @param aValue a value. * @return the largest (closest to positive infinity) floating-point value that less than or equal to the argument and is equal to a mathematical integer. */ floor(aValue: number): number; /** * Returns the double value that is closest in value to the argument and is equal to * a mathematical integer. * @param aValue a value. * @return the closest floating-point value to aValue that is equal to a mathematical integer. */ rint(aValue: number): number; /** * Returns the angle theta from the conversion of rectangular coordinates * (x, y) to polar coordinates (r, theta). * @param y the ordinate coordinate * @param x the abscissa coordinate * @return the theta component of the point (r, theta) in polar coordinates that corresponds to the point (x, y) in Cartesian coordinates. */ atan2(y: number, x: number): number; /** * Returns the value of the first argument raised to the power of the second argument. * @param aBase the base. * @param anExponent the exponent. * @return the value aBaseanExponent. */ pow(aBase: number, anExponent: number): number; /** * Returns the closest int to the argument. * @param aValue a floating-point value to be rounded to an integer. * @return the value of the argument rounded to the nearest int value. */ round(aValue: number): number; /** * Returns the closest long to the argument. * @param aValue a floating-point value to be rounded to a long. * @return the value of the argument rounded to the nearest long value. */ round(aValue: number): number; /** * Returns a double value with a positive sign, greater * than or equal to 0.0 and less than 1.0. * @return a pseudorandom double greater than or equal to 0.0 and less than 1.0. */ random(): number; /** * Returns the absolute value of an int value. * @param aValue the argument whose absolute value is to be determined * @return the absolute value of the argument. */ abs(aValue: number): number; /** * Returns the absolute value of a long value. * @param aValue the argument whose absolute value is to be determined * @return the absolute value of the argument. */ abs(aValue: number): number; /** * Returns the absolute value of a float value. * @param aValue the argument whose absolute value is to be determined * @return the absolute value of the argument. */ abs(aValue: number): number; /** * Returns the absolute value of a double value. * @param aValue the argument whose absolute value is to be determined * @return the absolute value of the argument. */ abs(aValue: number): number; /** * Returns the greater of two int values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the larger of aValue and anAnotherValue. */ max(aValue: number, anAnotherValue: number): number; /** * Returns the greater of two long values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the larger of a and anAnotherValue. */ max(aValue: number, anAnotherValue: number): number; /** * Returns the greater of two float values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the larger of aValue and anAnotherValue. */ max(aValue: number, anAnotherValue: number): number; /** * Returns the greater of two double values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the larger of aValue and anAnotherValue. */ max(aValue: number, anAnotherValue: number): number; /** * Returns the smaller of two int values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the smaller of aValue and anAnotherValue. */ min(aValue: number, anAnotherValue: number): number; /** * Returns the smaller of two long values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the smaller of aValue and anAnotherValue. */ min(aValue: number, anAnotherValue: number): number; /** * Returns the smaller of two float values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the smaller of aValue and anAnotherValue. */ min(aValue: number, anAnotherValue: number): number; /** * Returns the smaller of two double values. * @param aValue an argument. * @param anAnotherValue another argument. * @return the smaller of aValue and anAnotherValue. */ min(aValue: number, anAnotherValue: number): number; /** * Returns the size of an ulp of the argument. * @param aValue the floating-point value whose ulp is to be returned * @return the size of an ulp of the argument */ ulp(aValue: number): number; /** * Returns the size of an ulp of the argument. * @param aValue the floating-point value whose ulp is to be returned * @return the size of an ulp of the argument */ ulp(aValue: number): number; /** * Returns the signum function of the argument. * @param aValue the floating-point value whose signum is to be returned * @return the signum function of the argument */ signum(aValue: number): number; /** * Returns the signum function of the argument. * @param aValue the floating-point value whose signum is to be returned * @return the signum function of the argument */ signum(aValue: number): number; /** * Returns the hyperbolic sine of a double value. * @param aValue The number whose hyperbolic sine is to be returned. * @return The hyperbolic sine of aValue. */ sinh(aValue: number): number; /** * Returns the hyperbolic cosine of a double value. * @param aValue The number whose hyperbolic cosine is to be returned. * @return The hyperbolic cosine of aValue. */ cosh(aValue: number): number; /** * Returns the hyperbolic tangent of a double value. * @param aValue The number whose hyperbolic tangent is to be returned. * @return The hyperbolic tangent of aValue. */ tanh(aValue: number): number; /** * Returns sqrt(x2 +y2) without intermediate overflow or underflow. * @param x a value * @param y a value * @return sqrt(x2 +y2) without intermediate overflow or underflow */ hypot(x: number, y: number): number; /** * Returns ex -1. * @param x the exponent to raise e to in the computation of ex -1. * @return the value ex - 1. */ expm1(x: number): number; /** * Returns the natural logarithm of the sum of the argument and 1. * @param aValue a value * @return the value ln(aValue + 1), the natural log of aValue + 1 */ log1p(aValue: number): number; /** * Returns the first floating-point argument with the sign of the second floating-point argument. * @param aMagnitude the parameter providing the magnitude of the result * @param aSign the parameter providing the sign of the result * @return a value with the magnitude of aMagnitude and the sign of aSign. */ copySign(aMagnitude: number, aSign: number): number; /** * Returns the first floating-point argument with the sign of the second floating-point argument. * @param aMagnitude the parameter providing the magnitude of the result * @param aSign the parameter providing the sign of the result * @return a value with the magnitude of aMagnitude and the sign of aSign. */ copySign(aMagnitude: number, aSign: number): number; /** * Returns the unbiased exponent used in the representation of a float. * @param aValue a float value * @return the unbiased exponent of the argument */ getExponent(aValue: number): number; /** * Returns the unbiased exponent used in the representation of a double. * @param aValue a double value * @return the unbiased exponent of the argument */ getExponent(aValue: number): number; /** * Returns the floating-point number adjacent to the first argument in the direction of the second argument. * @param aStart starting floating-point value * @param aDirection value indicating which of aStart's neighbors or aStart should be returned * @return The floating-point number adjacent to aStart in the direction of aDirection. */ nextAfter(aStart: number, aDirection: number): number; /** * Returns the floating-point number adjacent to the first argument in the direction of the second argument. * @param aStart starting floating-point value * @param aDirection value indicating which of aStart's neighbors or aStart should be returned * @return The floating-point number adjacent to aStart in the direction of aDirection. */ nextAfter(aStart: number, aDirection: number): number; /** * Returns the floating-point value adjacent to a double in the direction of positive infinity. * @param aValue starting floating-point value * @return The adjacent floating-point value closer to positive infinity. */ nextUp(aValue: number): number; /** * Returns the floating-point value adjacent to a float in the direction of positive infinity. * @param aValue starting floating-point value * @return The adjacent floating-point value closer to positive infinity. */ nextUp(aValue: number): number; /** * Return aDouble × 2aScaleFactor rounded as if performed * by a single correctly rounded floating-point multiply to a member of the double value set. * @param aDouble number to be scaled by a power of two. * @param aScaleFactor power of 2 used to scale aDouble * @return aDouble × 2aScaleFactor */ scalb(aDouble: number, aScaleFactor: number): number; /** * Return aFloat × 2aScaleFactor rounded as if performed * by a single correctly rounded floating-point multiply to a member of the float value set. * @param aFloat number to be scaled by a power of two. * @param aScaleFactor power of 2 used to scale aFloat * @return aFloat × 2aScaleFactor */ scalb(aFloat: number, aScaleFactor: number): number; /** * Returns the sum of its arguments,throwing an exception if the result overflows an {@code int}. * @param x the first value * @param y the second value * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ addExact(x: number, y: number): number; /** * Returns the sum of its arguments, throwing an exception if the result overflows a {@code long}. * @param x the first value * @param y the second value * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ addExact(x: number, y: number): number; /** * Returns the difference of the arguments, throwing an exception if the result overflows an {@code int}. * @param x the first value * @param y the second value to subtract from the first * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ subtractExact(x: number, y: number): number; /** * Returns the difference of the arguments, throwing an exception if the result overflows a {@code long}. * @param x the first value * @param y the second value to subtract from the first * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ subtractExact(x: number, y: number): number; /** * Returns the product of the arguments, throwing an exception if the result overflows an {@code int}. * @param x the first value * @param y the second value * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ multiplyExact(x: number, y: number): number; /** * Returns the product of the arguments, throwing an exception if the result overflows a {@code long}. * @param x the first value * @param y the second value * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ multiplyExact(x: number, y: number): number; /** * Returns the argument incremented by one, throwing an exception if the result overflows an {@code int}. * @param a the value to increment * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ incrementExact(a: number): number; /** * Returns the argument incremented by one, throwing an exception if the result overflows a {@code long}. * @param a the value to increment * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ incrementExact(a: number): number; /** * Returns the argument decremented by one, throwing an exception if the result overflows an {@code int}. * @param a the value to decrement * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ decrementExact(a: number): number; /** * Returns the argument decremented by one, throwing an exception if the result overflows a {@code long}. * @param a the value to decrement * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ decrementExact(a: number): number; /** * Returns the negation of the argument, throwing an exception if the result overflows an {@code int}. * @param a the value to negate * @return the result * @throws ArithmeticException if the result overflows an int * @since Sitevision 4.0 * @since Java 1.8 */ negateExact(a: number): number; /** * Returns the negation of the argument, throwing an exception if the result overflows a {@code long}. * @param a the value to negate * @return the result * @throws ArithmeticException if the result overflows a long * @since Sitevision 4.0 * @since Java 1.8 */ negateExact(a: number): number; /** * Returns the value of the {@code long} argument, throwing an exception if the value overflows an {@code int}. * @param value the long value * @return the argument as an int * @throws ArithmeticException if the {@code argument} overflows an int * @since 1.8 */ toIntExact(value: number): number; /** * Returns the largest (closest to positive infinity) {@code int} value that is less than or equal to the algebraic quotient. * @param x the dividend * @param y the divisor * @return the largest (closest to positive infinity) {@code int} value that is less than or equal to the algebraic quotient. * @throws ArithmeticException if the divisor {@code y} is zero * @see #floorMod(int, int) * @see #floor(double) * @since Sitevision 4.0 * @since Java 1.8 */ floorDiv(x: number, y: number): number; /** * Returns the largest (closest to positive infinity) {@code long} value that is less than or equal to the algebraic quotient. * @param x the dividend * @param y the divisor * @return the largest (closest to positive infinity) {@code long} value that is less than or equal to the algebraic quotient. * @throws ArithmeticException if the divisor {@code y} is zero * @see #floorMod(long, long) * @see #floor(double) * @since Sitevision 4.0 * @since Java 1.8 */ floorDiv(x: number, y: number): number; /** * Returns the floor modulus of the {@code int} arguments. * @param x the dividend * @param y the divisor * @return the floor modulus {@code x - (floorDiv(x, y) * y)} * @throws ArithmeticException if the divisor {@code y} is zero * @see #floorDiv(int, int) * @since 1.8 */ floorMod(x: number, y: number): number; /** * Returns the floor modulus of the {@code long} arguments. * @param x the dividend * @param y the divisor * @return the floor modulus {@code x - (floorDiv(x, y) * y)} * @throws ArithmeticException if the divisor {@code y} is zero * @see #floorDiv(long, long) * @since Sitevision 4.0 * @since Java 1.8 */ floorMod(x: number, y: number): number; /** * Returns the floating-point value adjacent to {@code d} in the direction of negative infinity. * @param d starting floating-point value * @return The adjacent floating-point value closer to negative infinity. * @since Sitevision 4.0 * @since Java 1.8 */ nextDown(d: number): number; /** * Returns the floating-point value adjacent to {@code f} in the direction of negative infinity. * @param f starting floating-point value * @return The adjacent floating-point value closer to negative infinity. * @since Sitevision 4.0 * @since Java 1.8 */ nextDown(f: number): number; } declare namespace MathInstance {} declare var mathInstance: MathInstance; export default mathInstance;