update math for distance from center