• + 1 comment

    Math.abs() is used to avoid negative result . Hope this helps!