Function piston_window::math::inside_triangle
source ยท pub fn inside_triangle<T>(triangle: [[T; 2]; 3], v: [T; 2]) -> boolwhere
T: Float,
Expand description
Returns true if point is inside triangle.
This is done by computing a side
number for each edge.
If the number is inside if it is on the same side for all edges.
Might break for very small triangles.