Class Arithmetic

java.lang.Object
edu.tufts.hrilab.action.operators.Arithmetic

public final class Arithmetic extends Object
  • Constructor Details

    • Arithmetic

      public Arithmetic()
  • Method Details

    • add

      public static double add(Number a, Number b)
      The assign operator as implemented here doesn't work well for uninitialized arguments (null) as there's no way to make sure that the value we return is of the correct type. Example, this method will assign (string) "3" to an integer ActionBinding this is currently null...
    • increment

      public static int increment(int n)
    • subtract

      public static double subtract(Number a, Number b)
    • decrement

      public static int decrement(int n)
    • multiply

      public static double multiply(Number a, Number b)
    • divide

      public static double divide(Number a, Number b)
    • modulus

      public static double modulus(Number a, Number b)
    • round

      public static long round(Number a)