JavaScript Point Class