Geometry
import { angle2D, distance2D, midpoint2D } from '@rtorcato/js-common/geometry'
Exports
| Name | Summary |
|---|---|
angle2D | Calculates the angle (in radians) between two points in 2D space. |
distance2D | Calculates the distance between two points in 2D space. |
midpoint2D | Calculates the midpoint between two points in 2D space. |
pointInRect | Checks if a point is inside a rectangle. |
polygonArea | Calculates the area of a polygon given its vertices (Shoelace formula). |
rectsOverlap | Checks if two rectangles overlap. |