Slight optimization. Calculation of sqrt only once.
Script for double coordinates in externen class