示例#1
0
// Calc shortest distance from p_in to def.line (or extention of finite line) at proj_pt
double Line::FindDistance(const Point& p_in) const
{
  Point proj_pt = FindProjection(p_in);
  return p_in.GetDistance(proj_pt);
}
示例#2
0
 static inline bool IsColliding( Circle a,Point b ){
     return b.GetDistance(a.GetPoint()) <= a.r;
 }