UNPKG

mout

Version:

Modular Utilities

10 lines (9 loc) 217 B
"use strict"; exports.__esModule = true; /** * Check if value is close to target. */ function isNear(val, target, threshold) { return Math.abs(val - target) <= threshold; } exports["default"] = isNear;