Skip to content

@technobuddha > library > Geometry

Rectangle

NameTypeDescription
isInPolygonFunctionDetermines whether a given point or rectangle is inside or on the edge of a polygon.
isRectFunctionDetermines if the provided value is a Recte.
largestInscribedRectangleFunctionComputes the largest rectangle that can be inscribed within the given polygon.
LargestInscribedRectUnitOptionsTypeConfiguration options for the largest inscribed rectangle algorithm.
RectTypeA rectangle (defined by its top-left corner, width and height)
RotatedRectTypeRepresents 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);
toSquareFunctionConverts 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.