@technobuddha > library > Geometry
Rectangle
| Name | Type | Description |
|---|---|---|
| isInPolygon | Function | Determines whether a given point or rectangle is inside or on the edge of a polygon. |
| isRect | Function | Determines if the provided value is a Recte. |
| largestInscribedRectangle | Function | Computes the largest rectangle that can be inscribed within the given polygon. |
| LargestInscribedRectUnitOptions | Type | Configuration options for the largest inscribed rectangle algorithm. |
| Rect | Type | A rectangle (defined by its top-left corner, width and height) |
| RotatedRect | Type | Represents a rectangle that has been rotated by a certain angle. Extends the Rect type with additional properties for the area and rotation angle. const hull = convexHull(points); |
| toSquare | Function | Converts a Rect to the largest possible square that fits within it, centered along the longer dimension. If the rectangle is already a square, it returns the original rectangle. |