| |
- asInt16(array)
- Round and cast to 16 bit integer.
- calcBounds(array)
- Return the bounding rectangle of a 2D points array as a tuple:
(xMin, yMin, xMax, yMax)
- insetRect((xMin, yMin, xMax, yMax), dx, dy)
- Inset the rectangle by dx, dy on all sides.
- intRect((xMin, yMin, xMax, yMax))
- Return the rectangle, rounded off to integer values, but guaranteeing that
the resulting rectangle is NOT smaller than the original.
- normRect((xMin, yMin, xMax, yMax))
- Normalize the rectangle so that the following holds:
xMin <= xMax and yMin <= yMax
- offsetRect((xMin, yMin, xMax, yMax), dx, dy)
- Offset the rectangle by dx, dy.
- pointInRect((x, y), rect)
- Return True when point (x, y) is inside rect.
- pointsInRect(array, rect)
- Find out which points or array are inside rect.
Returns an array with a boolean for each point.
- rectCenter((xMin, yMin, xMax, yMax))
- Return the center of the rectangle as an (x, y) coordinate.
- scaleRect((xMin, yMin, xMax, yMax), x, y)
- Scale the rectangle by x, y.
- sectRect((xMin1, yMin1, xMax1, yMax1), (xMin2, yMin2, xMax2, yMax2))
- Return a boolean and a rectangle. If the input rectangles intersect, return
True and the intersecting rectangle. Return False and (0, 0, 0, 0) if the input
rectangles don't intersect.
- unionRect((xMin1, yMin1, xMax1, yMax1), (xMin2, yMin2, xMax2, yMax2))
- Return the smallest rectangle in which both input rectangles are fully
enclosed. In other words, return the total bounding rectangle of both input
rectangles.
- updateBounds(bounds, (x, y), min=<built-in function min>, max=<built-in function max>)
- Return the bounding recangle of rectangle bounds and point (x, y).
- vectorLength(vector)
- Return the length of the given vector.
|