Sha256: e01194248aa91dcc765679502b4a05deea6b708d9839784c7678b89aa995cd28
Contents?: true
Size: 331 Bytes
Versions: 51
Compression:
Stored size: 331 Bytes
Contents
@function be-close-to($this, $precision) { $actual: actual(); $when: false; @if type-of($actual) == "number" { $when: abs($this - $actual) < (bc-util-power(10, -$precision) / 2); } @else { $when: error("type", "The `be-close-to` matcher is only for numbers"); } @return should("be close to", $this, $when); }
Version data entries
51 entries across 51 versions & 2 rubygems