Diff
Not logged in

Differences From Artifact [05f672d15009c4b5]:

To Artifact [f28d7402b7cb4529]:


2 2 //------------------------------------------------------------- 3 3 // The circle passing three points 4 4 // 5 5 // Verified by 6 6 // - AOJ 0012 (only triangles) 7 7 //------------------------------------------------------------- 8 8 9 -double outer_prod( CMP a, CMP b ) 10 -{ 11 - return (a.real()*b.imag() - b.real()*a.imag())/2; 12 -} 9 +double outer_prod(const CMP& a, const CMP& b) { return imag(conj(a)*b); } 13 10 14 11 bool point_in_polygon( vector<CMP>& ps, CMP p ) 15 12 { 16 13 bool in = false; 17 14 for(int i=0; i<ps.size(); ++i) { 18 15 CMP a = ps[i] - p; 19 16 CMP b = ps[(i+1)%ps.size()] - p;