UI module

Rect

structextensionexperimentalsince 0.31.0Source

An axis-aligned rectangle: x, y is the top left corner.

Example↗
r := Rect.{ x = 10, y = 20, w = 100, h = 50 };
assert(contains(r, 10, 20));
assert(!contains(r, 110, 20));

Fields

x: float
y: float
w: float
h: float

See also