pmp.macro.math
Enum Eval.Function

java.lang.Object
  extended by java.lang.Enum<Eval.Function>
      extended by pmp.macro.math.Eval.Function
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Eval.Function>
Enclosing class:
Eval

protected static enum Eval.Function
extends java.lang.Enum<Eval.Function>

This enumerated type handles function calling. Most of functions are wrappers for functions defined in Math class.


Enum Constant Summary
ABS
          Returns absolute value of given nuber.
ACOS
          Returns the arc cosine of an angle, in the range of 0.0 through pi.
ADD
          Sums arbitrary number of numbers.
ASIN
          Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
ATAN
          Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
CBRT
          Returns the cube root of a given value.
CEIL
          Returns the smallest (closest to negative infinity) integer that is greater than or equal to the argument.
CMP
          Compares given numbers.
COS
          Returns the trigonometric cosine of an angle.
COSH
          Returns Euler's number e raised to the power of a given value.
DIV
          Performs integer division.
EXP
          Returns Euler's number e raised to the power of a given value.
FLOOR
          Returns the largest (closest to positive infinity) integer that is less than or equal to the argument.
GT
          Compares given numbers.
GTE
          Compares given numbers.
HYPOT
          Returns sqrt(x2+y2).
LN
          Returns the natural logarithm (base e) of a given value.
LOG10
          Returns the base 10 logarithm of a ven value.
LT
          Compares given numbers.
LTE
          Compares given numbers.
MAX
          Returns maximum of the given values.
MIN
          Returns minimum of the given values.
MOD
          Computes division modulo.
MUL
          Multiplies arbitrary number of numbers.
NEG
          Returns negation of given number.
POWER
          Returns the value of the first argument raised to the power of the second argument.
RANDOM
          If value is given then integer greater than or equal to 0 and less than given value is returned.
ROUND
          Returns the closest integer to the argument.
SIGNUM
          Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.
SIN
          Returns the trigonometric sine of an angle.
SQRT
          Returns square root of a given value.
SUB
          Subtracts two numbers.
TAN
          Returns the trigonometric tangent of an angle.
TANH
          Returns the hyperbolic tangent of an angle.
 
Method Summary
static Eval.Function valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Eval.Function[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADD

public static final Eval.Function ADD
Sums arbitrary number of numbers.


SUB

public static final Eval.Function SUB
Subtracts two numbers.


MUL

public static final Eval.Function MUL
Multiplies arbitrary number of numbers.


DIV

public static final Eval.Function DIV
Performs integer division.


POWER

public static final Eval.Function POWER
Returns the value of the first argument raised to the power of the second argument.


NEG

public static final Eval.Function NEG
Returns negation of given number.


MOD

public static final Eval.Function MOD
Computes division modulo.


SIN

public static final Eval.Function SIN
Returns the trigonometric sine of an angle.


COS

public static final Eval.Function COS
Returns the trigonometric cosine of an angle.


ASIN

public static final Eval.Function ASIN
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.


ACOS

public static final Eval.Function ACOS
Returns the arc cosine of an angle, in the range of 0.0 through pi.


TAN

public static final Eval.Function TAN
Returns the trigonometric tangent of an angle.


TANH

public static final Eval.Function TANH
Returns the hyperbolic tangent of an angle.


ATAN

public static final Eval.Function ATAN
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.


EXP

public static final Eval.Function EXP
Returns Euler's number e raised to the power of a given value.


LN

public static final Eval.Function LN
Returns the natural logarithm (base e) of a given value.


LOG10

public static final Eval.Function LOG10
Returns the base 10 logarithm of a ven value.


HYPOT

public static final Eval.Function HYPOT
Returns sqrt(x2+y2).


ABS

public static final Eval.Function ABS
Returns absolute value of given nuber.


SQRT

public static final Eval.Function SQRT
Returns square root of a given value.


CBRT

public static final Eval.Function CBRT
Returns the cube root of a given value.


COSH

public static final Eval.Function COSH
Returns Euler's number e raised to the power of a given value.


MAX

public static final Eval.Function MAX
Returns maximum of the given values.


MIN

public static final Eval.Function MIN
Returns minimum of the given values.


RANDOM

public static final Eval.Function RANDOM
If value is given then integer greater than or equal to 0 and less than given value is returned. Otherwise this function returns random number greater than or equal to 0.0 and less than 1.0.


SIGNUM

public static final Eval.Function SIGNUM
Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.


ROUND

public static final Eval.Function ROUND
Returns the closest integer to the argument.


CEIL

public static final Eval.Function CEIL
Returns the smallest (closest to negative infinity) integer that is greater than or equal to the argument.


FLOOR

public static final Eval.Function FLOOR
Returns the largest (closest to positive infinity) integer that is less than or equal to the argument.


CMP

public static final Eval.Function CMP
Compares given numbers. Returns 1 if the arguments are equal, otherwise returns zero.


GT

public static final Eval.Function GT
Compares given numbers. Returns 1 if the first argument is greater than the second otherwise returns zero.


LT

public static final Eval.Function LT
Compares given numbers. Returns 1 if the first argument is less than the second otherwise returns zero.


GTE

public static final Eval.Function GTE
Compares given numbers. Returns 1 if the first argument is greater or equal than the second otherwise returns zero.


LTE

public static final Eval.Function LTE
Compares given numbers. Returns 1 if the first argument is less or equal than the second otherwise returns zero.

Method Detail

values

public static final Eval.Function[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Eval.Function c : Eval.Function.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Eval.Function valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name