10#ifndef INFUSE_SDK_INCLUDE_INFUSE_MATH_CARTESIAN_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_MATH_CARTESIAN_H_
bool cartesian_point_in_polygon(struct cartesian_point_2d point, const struct cartesian_point_2d *polygon, size_t vertices)
Determine if a point in inside an arbitrary polygon.
bool cartesian_line_intersection(struct cartesian_line_2d a, struct cartesian_line_2d b, struct cartesian_point_2d *intersection)
Find the intersection point of two finite lines, if it exists.
uint32_t cartesian_distance_to_polygon_edge(struct cartesian_point_2d point, const struct cartesian_point_2d *polygon, size_t vertices)
Determine the minimum distance to a polygons edge.
bool cartesian_point_in_circle(struct cartesian_point_2d point, struct cartesian_point_2d origin, uint32_t radius)
Determine if a point in inside a circle.
Finite line in 2D space.
Definition cartesian.h:37
struct cartesian_point_2d a
First end point of the line.
Definition cartesian.h:39
struct cartesian_point_2d b
Second end point of the line.
Definition cartesian.h:41
Point in 2D space.
Definition cartesian.h:29
int32_t y
Y coordinate.
Definition cartesian.h:33
int32_t x
X coordinate.
Definition cartesian.h:31