Quad

data class Quad(val topLeft: Point, val topRight: Point, val bottomRight: Point, val bottomLeft: Point)

A convex quadrilateral with corners in a fixed clockwise order starting at the top-left, as seen in the image.

Constructors

Link copied to clipboard
constructor(topLeft: Point, topRight: Point, bottomRight: Point, bottomLeft: Point)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Polygon area (shoelace formula).

Link copied to clipboard

Mean of the horizontal edges divided by mean of the vertical edges. >1 means landscape.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Corners in clockwise order starting at topLeft.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun rotated(steps: Int): Quad

Returns the same quad with its corners cyclically shifted by steps positions (clockwise).