com.graphbuilder.math.func
Class RoundFunction

java.lang.Object
  extended bycom.graphbuilder.math.func.RoundFunction
All Implemented Interfaces:
Function

public class RoundFunction
extends java.lang.Object
implements Function

The round function.

See Also:
Math.round(double)

Constructor Summary
RoundFunction()
           
 
Method Summary
 boolean acceptNumParam(int numParam)
          Returns true only for 1 parameter, false otherwise.
 double of(double[] d, int numParam)
          Returns the value at d[0] rounded to the nearest integer value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoundFunction

public RoundFunction()
Method Detail

of

public double of(double[] d,
                 int numParam)
Returns the value at d[0] rounded to the nearest integer value. If the value exceeds the capabilities of long precision then the value itself is returned.

Specified by:
of in interface Function

acceptNumParam

public boolean acceptNumParam(int numParam)
Returns true only for 1 parameter, false otherwise.

Specified by:
acceptNumParam in interface Function

toString

public java.lang.String toString()