equal fn有误
givebest opened this issue · comments
givebest commented
function equal (a, b) { return Math.abs(a, b) < Number.EPSILON }
return 处应为:
return Math.abs(a - b) < Number.EPSILON
@see https://github.com/getify/You-Dont-Know-JS/blob/master/types%20%26%20grammar/ch2.md#small-decimal-values
shanyue commented
手误,非常感谢!