Checks if two numbers are approximately equal.

// Returns true
const approx = Chalkboard.numb.isApproxEqual(0.1 + 0.2, 0.3);
  • Parameters

    • a: number

      The first number

    • b: number

      The second number

    • Optionalprecision: number = 0.000001

      The precision to check

    Returns boolean