Math constructor

Math({
  1. num? e,
  2. num? ln10,
  3. num? ln2,
  4. num? log2e,
  5. num? log10e,
  6. num? pi,
  7. num? sqrt12,
  8. num? sqrt2,
  9. num abs(
    1. num
    )?,
  10. num acos(
    1. num
    )?,
  11. num asin(
    1. num
    )?,
  12. num atan(
    1. num
    )?,
  13. num atan2(
    1. num,
    2. num
    )?,
  14. num ceil(
    1. num
    )?,
  15. num cos(
    1. num
    )?,
  16. num exp(
    1. num
    )?,
  17. num floor(
    1. num
    )?,
  18. num log(
    1. num
    )?,
  19. num max([
    1. Iterable?
    ])?,
  20. num min([
    1. Iterable?
    ])?,
  21. num pow(
    1. num,
    2. num
    )?,
  22. num random()?,
  23. num round(
    1. num
    )?,
  24. num sin(
    1. num
    )?,
  25. num sqrt(
    1. num
    )?,
  26. num tan(
    1. num
    )?,
  27. num clz32(
    1. num
    )?,
  28. num imul(
    1. num,
    2. num
    )?,
  29. num sign(
    1. num
    )?,
  30. num log10(
    1. num
    )?,
  31. num log2(
    1. num
    )?,
  32. num log1p(
    1. num
    )?,
  33. num expm1(
    1. num
    )?,
  34. num cosh(
    1. num
    )?,
  35. num sinh(
    1. num
    )?,
  36. num tanh(
    1. num
    )?,
  37. num acosh(
    1. num
    )?,
  38. num asinh(
    1. num
    )?,
  39. num atanh(
    1. num
    )?,
  40. num hypot([
    1. Iterable?
    ])?,
  41. num trunc(
    1. num
    )?,
  42. num fround(
    1. num
    )?,
  43. num cbrt(
    1. num
    )?,
})

Implementation

factory Math({
  _i2.num? e,
  _i2.num? ln10,
  _i2.num? ln2,
  _i2.num? log2e,
  _i2.num? log10e,
  _i2.num? pi,
  _i2.num? sqrt12,
  _i2.num? sqrt2,
  _i2.num Function(_i2.num)? abs,
  _i2.num Function(_i2.num)? acos,
  _i2.num Function(_i2.num)? asin,
  _i2.num Function(_i2.num)? atan,
  _i2.num Function(
    _i2.num,
    _i2.num,
  )? atan2,
  _i2.num Function(_i2.num)? ceil,
  _i2.num Function(_i2.num)? cos,
  _i2.num Function(_i2.num)? exp,
  _i2.num Function(_i2.num)? floor,
  _i2.num Function(_i2.num)? log,
  _i2.num Function([_i2.Iterable<_i2.dynamic>?])? max,
  _i2.num Function([_i2.Iterable<_i2.dynamic>?])? min,
  _i2.num Function(
    _i2.num,
    _i2.num,
  )? pow,
  _i2.num Function()? random,
  _i2.num Function(_i2.num)? round,
  _i2.num Function(_i2.num)? sin,
  _i2.num Function(_i2.num)? sqrt,
  _i2.num Function(_i2.num)? tan,
  _i2.num Function(_i2.num)? clz32,
  _i2.num Function(
    _i2.num,
    _i2.num,
  )? imul,
  _i2.num Function(_i2.num)? sign,
  _i2.num Function(_i2.num)? log10,
  _i2.num Function(_i2.num)? log2,
  _i2.num Function(_i2.num)? log1p,
  _i2.num Function(_i2.num)? expm1,
  _i2.num Function(_i2.num)? cosh,
  _i2.num Function(_i2.num)? sinh,
  _i2.num Function(_i2.num)? tanh,
  _i2.num Function(_i2.num)? acosh,
  _i2.num Function(_i2.num)? asinh,
  _i2.num Function(_i2.num)? atanh,
  _i2.num Function([_i2.Iterable<_i2.dynamic>?])? hypot,
  _i2.num Function(_i2.num)? trunc,
  _i2.num Function(_i2.num)? fround,
  _i2.num Function(_i2.num)? cbrt,
}) =>
    Math._(
      e: e,
      ln10: ln10,
      ln2: ln2,
      log2e: log2e,
      log10e: log10e,
      pi: pi,
      sqrt12: sqrt12,
      sqrt2: sqrt2,
      abs: abs == null ? null : _i6.allowInterop(abs),
      acos: acos == null ? null : _i6.allowInterop(acos),
      asin: asin == null ? null : _i6.allowInterop(asin),
      atan: atan == null ? null : _i6.allowInterop(atan),
      atan2: atan2 == null ? null : _i6.allowInterop(atan2),
      ceil: ceil == null ? null : _i6.allowInterop(ceil),
      cos: cos == null ? null : _i6.allowInterop(cos),
      exp: exp == null ? null : _i6.allowInterop(exp),
      floor: floor == null ? null : _i6.allowInterop(floor),
      log: log == null ? null : _i6.allowInterop(log),
      max: max == null
          ? null
          : _i6.allowInterop(([
              a0,
              a1,
              a2,
              a3,
              a4,
              a5,
              a6,
              a7,
              a8,
              a9,
            ]) =>
              max([
                a0,
                a1,
                a2,
                a3,
                a4,
                a5,
                a6,
                a7,
                a8,
                a9,
              ])),
      min: min == null
          ? null
          : _i6.allowInterop(([
              a0,
              a1,
              a2,
              a3,
              a4,
              a5,
              a6,
              a7,
              a8,
              a9,
            ]) =>
              min([
                a0,
                a1,
                a2,
                a3,
                a4,
                a5,
                a6,
                a7,
                a8,
                a9,
              ])),
      pow: pow == null ? null : _i6.allowInterop(pow),
      random: random == null ? null : _i6.allowInterop(random),
      round: round == null ? null : _i6.allowInterop(round),
      sin: sin == null ? null : _i6.allowInterop(sin),
      sqrt: sqrt == null ? null : _i6.allowInterop(sqrt),
      tan: tan == null ? null : _i6.allowInterop(tan),
      clz32: clz32 == null ? null : _i6.allowInterop(clz32),
      imul: imul == null ? null : _i6.allowInterop(imul),
      sign: sign == null ? null : _i6.allowInterop(sign),
      log10: log10 == null ? null : _i6.allowInterop(log10),
      log2: log2 == null ? null : _i6.allowInterop(log2),
      log1p: log1p == null ? null : _i6.allowInterop(log1p),
      expm1: expm1 == null ? null : _i6.allowInterop(expm1),
      cosh: cosh == null ? null : _i6.allowInterop(cosh),
      sinh: sinh == null ? null : _i6.allowInterop(sinh),
      tanh: tanh == null ? null : _i6.allowInterop(tanh),
      acosh: acosh == null ? null : _i6.allowInterop(acosh),
      asinh: asinh == null ? null : _i6.allowInterop(asinh),
      atanh: atanh == null ? null : _i6.allowInterop(atanh),
      hypot: hypot == null
          ? null
          : _i6.allowInterop(([
              a0,
              a1,
              a2,
              a3,
              a4,
              a5,
              a6,
              a7,
              a8,
              a9,
            ]) =>
              hypot([
                a0,
                a1,
                a2,
                a3,
                a4,
                a5,
                a6,
                a7,
                a8,
                a9,
              ])),
      trunc: trunc == null ? null : _i6.allowInterop(trunc),
      fround: fround == null ? null : _i6.allowInterop(fround),
      cbrt: cbrt == null ? null : _i6.allowInterop(cbrt),
    );