Merge "Don't use pow for distance calculation" into sc-dev