20 lines
586 B
Java
20 lines
586 B
Java
|
package io.gitlab.jfronny.muscript.compiler.expr.number.math;
|
||
|
|
||
|
import io.gitlab.jfronny.muscript.compiler.expr.*;
|
||
|
import io.gitlab.jfronny.muscript.dynamic.*;
|
||
|
|
||
|
public class Minus extends NumberExpr {
|
||
|
private final NumberExpr minuend;
|
||
|
private final NumberExpr subtrahend;
|
||
|
|
||
|
public Minus(NumberExpr minuend, NumberExpr subtrahend) {
|
||
|
this.minuend = minuend;
|
||
|
this.subtrahend = subtrahend;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public Double get(Dynamic<?> branch, Dynamic<?> dataRoot) {
|
||
|
return minuend.get(branch, dataRoot) - subtrahend.get(branch, dataRoot);
|
||
|
}
|
||
|
}
|