MCPcopy Create free account
hub / github.com/MapServer/MapServer / msSquareDistancePointToPoint

Function msSquareDistancePointToPoint

mapsearch.c:324–332  ·  view source on GitHub ↗

** Quickly compute the square of the distance; avoids expensive sqrt() call on each invocation */

Source from the content-addressed store, hash-verified

322** Quickly compute the square of the distance; avoids expensive sqrt() call on each invocation
323*/
324double msSquareDistancePointToPoint(pointObj *a, pointObj *b)
325{
326 double dx, dy;
327
328 dx = a->x - b->x;
329 dy = a->y - b->y;
330
331 return(dx*dx + dy*dy);
332}
333
334double msDistancePointToSegment(pointObj *p, pointObj *a, pointObj *b)
335{

Callers 3

msDistancePointToPointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected