RectSide

The four visually named sides of a rectangle.

Declaration order is Polygon.Rectangle's counter-clockwise walk — bottom, right, top, left — so on a freshly built rectangle each entry's ordinal is also its edge's index in the rectangle's Polygon.edges. The names themselves are visual, not structural: edges[side] answers by outward direction, so it keeps naming the visually right side after mirrors or negation shuffle the indices; integer indexing stays the structural lane.

Entries

Link copied to clipboard

The side facing down — outward direction (0, −1).

Link copied to clipboard

The side facing right — outward direction (1, 0).

Link copied to clipboard

The side facing up — outward direction (0, 1).

Link copied to clipboard

The side facing left — outward direction (−1, 0).

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun valueOf(value: String): RectSide

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.