openlayers/ol3 — pull request #1225 by ahocevar (2013-11-04 18:47:21+00:00)
Title: Clean up squaredDistanceToSegment and closestOnSegment

Since we do not use the 'along' property anywhere, and the resulting array returned by closestOnSegment could cause trouble when working with 3d coodinates, the new `footOfPerpendicularToSegment` function does exactly what it says, and the squared distance to a segment is calculated using the `squaredDistance` function instead.

The `squaredDistanceToSegment` function is moved to the `ol.coordinate` package, so it lives next to the functions it depends on.