面试问题求解# JobHunting - 待字闺中w*02014-09-02 07:091 楼Given a triangle and a point, how do you tell if the point is inside thetriangleor outside? Extend this for a irregular polygon
c*22014-09-02 07:092 楼随机选个方向过这点做射线,计算射线于polygon的多少条边相交,奇数在里面偶数在外面。注意不能是polygon的顶点,否则另选射线,因为随机性,过顶点的概率几乎是0【在 w****0 的大作中提到】: Given a triangle and a point, how do you tell if the point is inside the: triangle: or outside? Extend this for a irregular polygon