Added distanceToOrigin() method, but it does not yet work.