use Math.abs for condition