moved DistanceConstraint.update to the .prototype