fix: use `abs` instead of incorrect double comparison