get the distance between 0 and a number javascript code example Example: javascript distance between two points Math.hypot(x2-x1, y2-y1)