37inline bool is_convex(Vector2f A, Vector2f B, Vector2f C,
bool clockwise =
true) {
39 Vector2f BA = {A.x - B.x, A.y - B.y};
40 Vector2f BC = {C.x - B.x, C.y - B.y};
42 double cross = BA.cross(BC);
47 if (std::abs(cross) < epsilond)
55 return clockwise ? (cross < 0) : (cross > 0);
74inline bool is_concave(Vector2f A, Vector2f B, Vector2f C,
bool clockwise =
true) {
bool is_convex(Vector2f A, Vector2f B, Vector2f C, bool clockwise=true)
check if the angle is convex or concave
Definition geometry.hpp:37
bool is_concave(Vector2f A, Vector2f B, Vector2f C, bool clockwise=true)
check if the angle is concave
Definition geometry.hpp:74