Class Modifiers
java.lang.Object
me.datafox.dfxengine.values.utils.Modifiers
A utility class that contains various methods for creating
Modifiers
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OperationModifier
Wrapper forOperations.add(Numeral, Numeral)
.static OperationModifier
cbrt
(int priority) Wrapper forOperations.cbrt(Numeral)
.static OperationModifier
Wrapper forOperations.divide(Numeral, Numeral)
.static OperationModifier
divideReversed
(int priority, Value dividend) Wrapper forOperations.divide(Numeral, Numeral)
with reversed parameters.static OperationModifier
exp
(int priority) Wrapper forOperations.exp(Numeral)
.static MappingOperationModifier
fractionMultiply
(int priority, Value percentage, Value multiplier) The formula for theMappingOperationModifier
is[source] * ([percentage] * [multiplier] + 1)
.static OperationModifier
inverse
(int priority) Wrapper forOperations.inverse(Numeral)
.static OperationModifier
Wrapper forOperations.lerp(Numeral, Numeral, Numeral)
.static OperationModifier
log
(int priority) Wrapper forOperations.log(Numeral)
.static OperationModifier
log10
(int priority) Wrapper forOperations.log10(Numeral)
.static OperationModifier
log2
(int priority) Wrapper forOperations.log2(Numeral)
.static OperationModifier
Wrapper forOperations.root(Numeral, Numeral)
.static OperationModifier
logNReversed
(int priority, Value value) Wrapper forOperations.root(Numeral, Numeral)
with reversed parameters.static OperationModifier
Wrapper forOperations.max(Numeral, Numeral)
.static OperationModifier
Wrapper forOperations.min(Numeral, Numeral)
.static OperationModifier
Wrapper forOperations.multiply(Numeral, Numeral)
.static OperationModifier
operation
(int priority, DualParameterOperation operation, Value parameter1, Value parameter2) static OperationModifier
static OperationModifier
operation
(int priority, SingleParameterOperation operation, Value parameter) static OperationModifier
operation
(int priority, SourceOperation operation) static OperationModifier
Wrapper forOperations.power(Numeral, Numeral)
.static MappingOperationModifier
powerMultiply
(int priority, Value base, Value exponent) The formula for theMappingOperationModifier
is[source] * ([base][exponent])
.static OperationModifier
powerReversed
(int priority, Value base) Wrapper forOperations.power(Numeral, Numeral)
with reversed parameters.static SingleParameterOperation
reverse
(SingleParameterOperation operation) static OperationModifier
Wrapper forOperations.root(Numeral, Numeral)
.static OperationModifier
rootReversed
(int priority, Value value) Wrapper forOperations.root(Numeral, Numeral)
with reversed parameters.static OperationModifier
sqrt
(int priority) Wrapper forOperations.sqrt(Numeral)
.static OperationModifier
Wrapper forOperations.subtract(Numeral, Numeral)
.static OperationModifier
subtractReversed
(int priority, Value minuend) Wrapper forOperations.subtract(Numeral, Numeral)
with reversed parameters.
-
Constructor Details
-
Modifiers
public Modifiers()
-
-
Method Details
-
operation
- Parameters:
priority
- priority for theOperationModifier
operation
-Operation
for theOperationModifier
parameters
- parameterValues
for theOperationModifier
- Returns:
OperationModifier
with the specified parameters
-
operation
- Parameters:
priority
- priority for theOperationModifier
operation
-Operation
for theOperationModifier
- Returns:
OperationModifier
with the specified parameters
-
operation
public static OperationModifier operation(int priority, SingleParameterOperation operation, Value parameter) - Parameters:
priority
- priority for theOperationModifier
operation
-Operation
for theOperationModifier
parameter
- parameterValue
for theOperationModifier
- Returns:
OperationModifier
with the specified parameters
-
operation
public static OperationModifier operation(int priority, DualParameterOperation operation, Value parameter1, Value parameter2) - Parameters:
priority
- priority for theOperationModifier
operation
-Operation
for theOperationModifier
parameter1
- first parameterValue
for theOperationModifier
parameter2
- second parameterValue
for theOperationModifier
- Returns:
OperationModifier
with the specified parameters
-
add
Wrapper forOperations.add(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
addend
- addendValue
for theOperationModifier
- Returns:
OperationModifier
that does addition
-
subtract
Wrapper forOperations.subtract(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
subtrahend
- subtrahendValue
for theOperationModifier
- Returns:
OperationModifier
that does subtraction
-
subtractReversed
Wrapper forOperations.subtract(Numeral, Numeral)
with reversed parameters.- Parameters:
priority
- priority for theOperationModifier
minuend
- minuendValue
for theOperationModifier
- Returns:
OperationModifier
that does subtraction
-
multiply
Wrapper forOperations.multiply(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
multiplier
- multiplierValue
for theOperationModifier
- Returns:
OperationModifier
that does multiplication
-
divide
Wrapper forOperations.divide(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
divisor
- divisorValue
for theOperationModifier
- Returns:
OperationModifier
that does division
-
divideReversed
Wrapper forOperations.divide(Numeral, Numeral)
with reversed parameters.- Parameters:
priority
- priority for theOperationModifier
dividend
- dividendValue
for theOperationModifier
- Returns:
OperationModifier
that does division
-
inverse
Wrapper forOperations.inverse(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does inversion
-
power
Wrapper forOperations.power(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
exponent
- exponentValue
for theOperationModifier
- Returns:
OperationModifier
that does exponentiation
-
powerReversed
Wrapper forOperations.power(Numeral, Numeral)
with reversed parameters.- Parameters:
priority
- priority for theOperationModifier
base
- baseValue
for theOperationModifier
- Returns:
OperationModifier
that does exponentiation
-
exp
Wrapper forOperations.exp(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does exponentiation
-
sqrt
Wrapper forOperations.sqrt(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does square root
-
cbrt
Wrapper forOperations.cbrt(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does cube root
-
root
Wrapper forOperations.root(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
base
- baseValue
for theOperationModifier
- Returns:
OperationModifier
that does nth base
-
rootReversed
Wrapper forOperations.root(Numeral, Numeral)
with reversed parameters.- Parameters:
priority
- priority for theOperationModifier
value
- valueValue
for theOperationModifier
- Returns:
OperationModifier
that does nth root
-
log
Wrapper forOperations.log(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does natural logarithm
-
log2
Wrapper forOperations.log2(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does binary logarithm
-
log10
Wrapper forOperations.log10(Numeral)
.- Parameters:
priority
- priority for theOperationModifier
- Returns:
OperationModifier
that does decimal logarithm
-
logN
Wrapper forOperations.root(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
base
- baseValue
for theOperationModifier
- Returns:
OperationModifier
that does nth logarithm
-
logNReversed
Wrapper forOperations.root(Numeral, Numeral)
with reversed parameters.- Parameters:
priority
- priority for theOperationModifier
value
- valueValue
for theOperationModifier
- Returns:
OperationModifier
that does nth logarithm
-
min
Wrapper forOperations.min(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
value
- valueValue
for theOperationModifier
- Returns:
OperationModifier
that does minimum
-
max
Wrapper forOperations.max(Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
value
- valueValue
for theOperationModifier
- Returns:
OperationModifier
that does maximum
-
lerp
Wrapper forOperations.lerp(Numeral, Numeral, Numeral)
.- Parameters:
priority
- priority for theOperationModifier
min
- minimumValue
for theOperationModifier
max
- maximumValue
for theOperationModifier
- Returns:
OperationModifier
that does linear interpolation
-
fractionMultiply
public static MappingOperationModifier fractionMultiply(int priority, Value percentage, Value multiplier) The formula for theMappingOperationModifier
is[source] * ([percentage] * [multiplier] + 1)
.- Parameters:
priority
- priority for theMappingOperationModifier
percentage
- percentageValue
for theMappingOperationModifier
multiplier
- multiplierValue
for theMappingOperationModifier
- Returns:
MappingOperationModifier
that does the specified mathematical operation
-
powerMultiply
The formula for theMappingOperationModifier
is[source] * ([base][exponent])
.- Parameters:
priority
- priority for theMappingOperationModifier
base
- baseValue
for theMappingOperationModifier
exponent
- exponentValue
for theMappingOperationModifier
- Returns:
MappingOperationModifier
that does the specified mathematical operation
-
reverse
- Parameters:
operation
-SingleParameterOperation
to be reversed- Returns:
SingleParameterOperation
with reversed parameters
-