|
PatchworkOS
966e257
A non-POSIX operating system.
|
Polygon. More...
Polygon.
Functions | |
| void | polygon_rotate (point_t *points, uint64_t pointCount, double angle, point_t center) |
| Rotate a polygon around a center point. | |
| bool | polygon_contains (double px, double py, const point_t *points, uint64_t pointCount) |
| Check if a point is inside a polygon. | |
Rotate a polygon around a center point.
| points | The points of the polygon. |
| pointCount | The number of points in the polygon. |
| angle | The angle to rotate by, in radians. |
| center | The center point to rotate around. |
Definition at line 4 of file polygon.c.
Check if a point is inside a polygon.
We use doubles for the point coordinates instead of just point_t to allow for sub-pixel points.
| px | The x coordinate of the point. |
| py | The y coordinate of the point. |
| points | The points of the polygon. |
| pointCount | The number of points in the polygon. |
true if the point is inside the polygon, false otherwise. Definition at line 27 of file polygon.c.