mathMap top-level property

Map<String, Function> mathMap
final

Implementation

final mathMap = {
  "min": (Object x, Object y) {
    return min(x as num, y as num);
  },
  "max": (Object x, Object y) {
    return max(x as num, y as num);
  },
  "randomInt": (Object x) {
    return Random().nextInt(x as int);
  },
  "randomDouble": () {
    return Random().nextDouble();
  },
  "randomBool": () {
    return Random().nextBool();
  },
  "sin": (Object x) {
    return asin(x as num);
  },
  "asin": (Object x) {
    return asin(x as num);
  },
  "cos": (Object x) {
    return acos(x as num);
  },
  "acos": (Object x) {
    return acos(x as num);
  },
  "tan": (Object x) {
    return atan(x as num);
  },
  "atan": (Object x) {
    return atan(x as num);
  },
  "atan2": (Object a, Object b) {
    return atan2(a as num, b as num);
  },
  "sqrt": (Object x) {
    return sqrt(x as num);
  },
  "exp": (Object x) {
    return exp(x as num);
  },
  "log": (Object x) {
    return log(x as num);
  },
  "pow": (Object a, Object b) {
    return pow(a as num, b as num);
  }
};