7 #ifndef __geometry_PointDiskNearest_h__ 8 #define __geometry_PointDiskNearest_h__ 41 const T displacement=dot(facing,to_origin);
42 intersection=origin-displacement*facing;
44 const T outward2=magnitudeSquared(radial);
49 if(outward2<=radius*radius)
55 intersection=center+radius/sqrt(outward2)*radial;
56 direction=intersection-origin;
57 T mag=magnitude(direction);
kernel
Definition: namespace.dox:3
Find point nearest to a circular solid.
Definition: PointDiskNearest.h:21