Welcome to Python-flavored Magnum! Please note that, while already being
rather stable, this functionality is still considered experimental and
some APIs might get changed without preserving full backwards compatibility.
class
Range2DuiTwo-dimensional unsigned integral range
Static methods
Methods
- def center(self, /) -> Vector2ui
- Range center
- def center_x(self, /) -> int
- Range center on X axis
- def center_y(self, /) -> int
- Range center on Y axis
- def contains(self, arg0: Vector2ui, /) -> bool
- Whether given point is contained inside the range
- def contains(self, arg0: Range2Dui, /) -> bool
- Whether another range is fully contained inside this range
- def padded(self, arg0: Vector2ui, /) -> Range2Dui
- Padded ange
- def scaled(self, arg0: Vector2ui, /) -> Range2Dui
- Scaled range
- def scaled(self, arg0: int, /) -> Range2Dui
- Scaled range
- def scaled_from_center(self, arg0: Vector2ui, /) -> Range2Dui
- Range scaled from the center
- def scaled_from_center(self, arg0: int, /) -> Range2Dui
- Range scaled from the center
- def size(self, /) -> Vector2ui
- Range size
- def size_x(self, /) -> int
- Range width
- def size_y(self, /) -> int
- Range height
- def translated(self, arg0: Vector2ui, /) -> Range2Dui
- Translated range
- def x(self, /) -> Range1Dui
- Range in the X axis
- def y(self, /) -> Range1Dui
- Range in the Y axis
Special methods
- def __eq__(self, arg0: Range2Dui, /) -> bool
- Equality comparison
- def __getstate__(self, /) -> bytes
- def __init__(self, arg0: Range2Di, /) -> None
- Construct from different underlying type
- def __init__(self, arg0: Range2D, /) -> None
- Construct from different underlying type
- def __init__(self, arg0: Range2Dd, /) -> None
- Construct from different underlying type
- def __init__(self, /) -> None
- Default constructor
- def __init__(self, arg0: Vector2ui, arg1: Vector2ui, /) -> None
- Construct a range from minimal and maximal coordinates
- def __init__(self, arg0: tuple[Vector2ui, Vector2ui], /) -> None
- Construct a range from minimal and maximal coordinates
- def __init__(self, arg0: tuple[tuple[int, int], tuple[int, int]], /) -> None
- Construct a range from a pair of minimal and maximal coordinates
- def __ne__(self, arg0: Range2Dui, /) -> bool
- Non-equality comparison
- def __repr__(self, /) -> str
- Object representation
- def __setstate__(self, arg0: bytes, /) -> None
Properties
- bottom: int get set
- Bottom edge
- bottom_left: Vector2ui get set
- Bottom left corner
- bottom_right: Vector2ui get set
- Bottom right corner
- left: int get set
- Left edge
- max: Vector2ui get set
- Maximal coordinates (exclusive)
- min: Vector2ui get set
- Minimal coordinates (inclusive)
- right: int get set
- Right edge
- top: int get set
- Top edge
- top_left: Vector2ui get set
- Top left corner
- top_right: Vector2ui get set
- Top right corner