Function inBallpark

  • check if a number is in ballpark of another number. See also roundTo

    Parameters

    • actual: number
    • expected: number
    • OptionalallowedDifferenceMultiplier: number

      a number between 0 and 1 (exclusive). 0.1 (default) means 10% difference is allowed.

    Returns void

    inBallpark(1, 1.1);
    
    inBallpark(1, 1.1, 0.1);