lib/ops.js
/**
 * Check if input equals zero within given tolerance
 */
Check if input equals zero within given tolerance
Check if input equals zero within given tolerance
function iszero(x, tolerance) {
    if (tolerance === void 0) { tolerance = constants_1.EPSILON; }
    return Math.abs(x) <= tolerance;
}
function iszero ( x , tolerance ) { if ( tolerance === void 0 ) { tolerance = constants_1 . EPSILON ; } return Math . abs ( x ) <= tolerance ; }
Check if input equals zero within given tolerance
Check if input equals zero within given tolerance
// the 'less-than-equal' comparision is necessary for correct result // when tolerance = 0