diff options
author | lawnjelly <lawnjelly@gmail.com> | 2024-05-20 10:16:23 +0100 |
---|---|---|
committer | lawnjelly <lawnjelly@gmail.com> | 2024-05-20 18:34:45 +0100 |
commit | 331ecf3ca86c3fca5e8e289cef47829e111d93ee (patch) | |
tree | 38c7c11e8052ea68e4f993b4873e0737681c8c3c /core | |
parent | daa81bbb7d1c6d75d1711595604178ee62a5801d (diff) | |
download | redot-engine-331ecf3ca86c3fca5e8e289cef47829e111d93ee.tar.gz |
Clarify is_polygon_clockwise() coordinate system
The function assumes a normal Cartesian coordinate system.
Diffstat (limited to 'core')
-rw-r--r-- | core/math/geometry_2d.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h index 1502b2807c..83ebdc5a84 100644 --- a/core/math/geometry_2d.h +++ b/core/math/geometry_2d.h @@ -350,6 +350,8 @@ public: return triangles; } + // Assumes cartesian coordinate system with +x to the right, +y up. + // If using screen coordinates (+x to the right, +y down) the result will need to be flipped. static bool is_polygon_clockwise(const Vector<Vector2> &p_polygon) { int c = p_polygon.size(); if (c < 3) { |