SOURCE

const approximatelyEqual =(v1,v2,eqsilon=0.001) =>Math.abs(v1-v2)<eqsilon

approximatelyEqual(Math.PI,3.1415) //true
console 命令行工具 X clear

                    
>
console