Gg.Box22D axis-aligned boxes.
type t = box2The type for 2D boxes (rectangles).
dim is the dimension of the boxes of type box2.
type v = v2The type for 2D vectors.
type p = p2The type for 2D points.
type size = size2The type for 2D sizes.
type m = m2The type for matrices representing linear transformations of 2D space.
val empty : box2empty is the empty box.
val ox : box2 -> floatox b is V2.x (o b).
val oy : box2 -> floatoy b is V2.y (o b).
val w : box2 -> floatw b is Size2.w (size b).
val h : box2 -> floath b is Size2.h (size b).
val aspect : box2 -> floataspect b is Size2.aspect (size b).
val zero : box2zero is a box whose origin and size is zero.
val unit : box2unit is the unit box which extends from zero to one in all dimensions.
val minx : box2 -> floatminx b is V2.x (min b).
val miny : box2 -> floatminy b is V2.y (min b).
max b is the greatest point of b (its size added to the origin).
Raises Invalid_argument on empty
val maxx : box2 -> floatmaxx b is V2.x (max b).
val maxy : box2 -> floatmaxy b is V2.y (max b).
val midx : box2 -> floatmidx b is V2.x (mid b).
val midy : box2 -> floatmidy b is V2.y (mid b).
val area : box2 -> floatarea b is the surface area of b.
inter b b' is a box whose space is the intersection of 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.
val is_pt : box2 -> boolis_pt b is true iff b is not empty and its size is equal to 0 in every dimension.
val is_seg : box2 -> boolis_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.
val pp : Stdlib.Format.formatter -> box2 -> unitpp ppf b prints a textual representation of b on ppf.