Page
Library
Module
Module type
Parameter
Class
Class type
Source
Gg.Box2Source2D axis-aligned boxes.
The type for 2D boxes (rectangles).
The type for matrices representing linear transformations of 2D space.
min b is the smallest point of b (its origin).
Raises Invalid_argument on empty
max b is the greatest point of b (its size added to the origin).
Raises Invalid_argument on empty
mid b is the mid point between min and max.
Raises Invalid_argument on empty
br_pt b is the bottom-right corner of b.
Raises Invalid_argument on empty
inter b b' is a box whose space is the intersection of S(b) and S(b').
union b b' is the smallest box whose space contains S(b) and S(b').
inset d b is b whose edges are inset in each dimension according to amounts in d. Negative values in d outset. If the size in dimension i becomes negative it is clamped to 0 and the ith coordinate of the mid point of b is used for the ith coordinate of the resulting box's origin. Returns empty on empty.
is_pt b is true iff b is not empty and its size is equal to 0 in every dimension.
is_seg b is true iff b is not empty and its size is equal to 0 in exactly one dimension.
equal_f eq b b' tests b and b' like equal but uses eq to test floating point values.
compare_f cmp b b' compares b and b' like compare but uses cmp to compare floating point values.
pp ppf b prints a textual representation of b on ppf.
pp_f pp_fl ppf b prints b like pp but uses pp_fl to print floating point values.