Exemple #1
0
 public BooleanOperand LessThan(NumericOperand other)
 {
     return(other != null && Value < other.Value ? Operand.True : Operand.False);
 }
Exemple #2
0
 public BooleanOperand Equality(NumericOperand other)
 {
     return(other != null && Math.Abs(other.Value - Value) < 0.00001 ? Operand.True : Operand.False);
 }
Exemple #3
0
 public NumericOperand Modulo(NumericOperand other)
 {
     return(other == null ? this : new NumericOperand(value: Value % other.Value));
 }
Exemple #4
0
 public NumericOperand Power(NumericOperand other)
 {
     return(other == null ? this : new NumericOperand(value: Math.Pow(Value, other.Value)));
 }
Exemple #5
0
 public NumericOperand Multiply(NumericOperand other)
 {
     return(other == null ? this : new NumericOperand(value: Value *other.Value));
 }
Exemple #6
0
 public NumericOperand Add(NumericOperand other)
 {
     return(other == null ? this : new NumericOperand(value: Value + other.Value));
 }