2D integer box.
typedef struct B2i

Minimum point.
S2i a;

Maximum point.
S2i b;

End block 'B2i'
} B2i;

Check if box area is greater than zero.
API bool B2iIsValid(B2i bbox);
b: Box.
returns: True if box has a positive area.

Check if box intersects with scalar.
API bool B2iIsIntersectS2i(B2i b, S2i s);
b: Box.
s: Scalar.
returns: True if scalar intersects box.

Check if boxes intersect.
API bool B2iIsIntersect(B2i a, B2i b);
a: First box.
b: Second box.
returns: True if second box intersects first box.

Check if second box is inside first box.
API bool B2iIsInside(B2i a, B2i b);
a: First box.
b: Second box.
returns: True if second box is inside first box.

Check if box's a and b scalars are zero.
API bool B2iIsZero(B2i b);
b: Box.
returns: True if box points are zero.

Construct scalar that is the dimenensions of the box.
API S2i B2iDims(B2i b);
b: Box.
returns: Box dimensions.

Get area of box.
API float B2iArea(B2i b);
b: Box.
returns: Area of box.

Construct scalar that is the point within the box derived from normalized local box coordinates.
API S2i B2iPoint(B2i b, float x, float y);
b: b.
x: Normalized local box X.
y: Normalized local box Y.
returns: Point within box.

Construct box that is the intersection of input boxes.
API B2i B2iIntersect(B2i a, B2i b);
a: First box.
b: Second box.
returns: Intersection box.

Construct scalar from the input scalar constrained to the box.
API S2i B2iConstrainS2i(B2i b, S2i s);
b: Box.
s: Scalar.
returns: Constrained scalar.

Construct box that is the second box constrained to the first box.
API B2i B2iConstrain(B2i a, B2i b);
a: First box.
b: Second box.
returns: Constrained box.

Encompass box around scalar. Box must be initially constructed to match desired starting point, then call this function to expand box around additional scalars or boxes.
API void B2iEncloseS2i(B2i *b, S2i s);
b: Box.
s: Scalar.

Encompass first box around second box. Encompassing box must be initially constructed to match desired starting point, then call this function to expand encompassing box around additional scalars or boxes.
API void B2iEnclose(B2i *a, B2i b);
a: First box.
b: Second box.

Construct box that is sum of input boxes.
API B2i B2iAdd(B2i a, B2i b);
a: First box.
b: Second box.
returns: Sum of boxes.

Construct box that is difference of input boxes.
API B2i B2iSub(B2i a, B2i b);
a: First box.
b: Second box.
returns: Difference of boxes.

Construct box that is product of input boxes.
API B2i B2iMul(B2i a, B2i b);
a: First box.
b: Second box.
returns: Product of boxes.

Construct box that is division of input boxes.
API B2i B2iDiv(B2i a, B2i b);
a: First box.
b: Second box.
returns: Division of boxes.

Construct box that is modulo of input boxes.
API B2i B2iMod(B2i a, B2i b);
a: First box.
b: Second box.
returns: Modulo of boxes.

Construct 2D integer box.
API B2i B2iFromS2i(S2i a, S2i b);
a: Min scalar.
b: Max scalar.
returns: 2D integer box.

Construct 2D integer box.
API B2i B2iMake(int ax, int ay, int bx, int by);
ax: Min X scalar.
ay: Min Y scalar.
bx: Max X scalar.
by: Max Y scalar.
returns: 2D integer box.