•nt
CGrapheditDoc::FindNode( const CPoint & p )
•{ const int TOLL = 25;
• int mind = -1; int minn = -1;
• for(int
n=0;n<nodes.size();++n)
• { int d = Dist( p, nodes[n].p );
• if( mind==-1 || mind>d )
• { mind = d;
• minn = n;
• }
• }
• if(mind<=TOLL) return
minn;
• else return -1;
•}