Package com.graphbuilder.math.func
Class ModFunction
java.lang.Object
com.graphbuilder.math.func.ModFunction
- All Implemented Interfaces:
Function
The mod function.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptNumParam(int numParam) Returns true only for 2 parameters, false otherwise.doubleof(double[] d, int numParam) Returns the value of x % y, where x = d[0] and y = d[1].toString()
-
Constructor Details
-
ModFunction
public ModFunction()
-
-
Method Details
-
of
public double of(double[] d, int numParam) Returns the value of x % y, where x = d[0] and y = d[1]. More precisely, the value returned is x minus the value of x / y, where x / y is rounded to the closest integer value towards 0. -
acceptNumParam
public boolean acceptNumParam(int numParam) Returns true only for 2 parameters, false otherwise.- Specified by:
acceptNumParamin interfaceFunction
-
toString
-