fix point in polygon test. det(i) was redefined as det([q_i q_i+1]*-r) in hormann-agathos paper. This was leading to incorrect test when crossing local x-axis.