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.

# magnum.Vector4ui class

Four-component unsigned integral vector

• Reference

## Static methods

def zero_init() -> Vector4ui
Construct a zero vector

## Methods

def dot(self, /) -> int
Dot product of the vector
def flipped(self, /) -> Vector4ui
Flipped vector
def is_zero(self, /) -> bool
Whether the vector is zero
def max(self, /) -> int
Maximal value in the vector
def min(self, /) -> int
Minimal value in the vector
def minmax(self, /) -> typing.Tuple[int, int]
Minimal and maximal value in the vector
def product(self, /) -> int
Product of values in the vector
def sum(self, /) -> int
Sum of values in the vector

## Special methods

def __add__(self, arg0: Vector4ui, /) -> Vector4ui
def __and__(self, arg0: Vector4ui, /) -> Vector4ui
Bitwise AND of two integral vectors
def __eq__(self, arg0: Vector4ui, /) -> bool
Equality comparison
def __ge__(self, arg0: Vector4ui, /) -> BoolVector4
Component-wise greater than or equal comparison
def __getattr__(self, arg0: str, /) -> object
Vector swizzle
def __getitem__(self, arg0: int, /) -> int
Value at given position
def __gt__(self, arg0: Vector4ui, /) -> BoolVector4
Component-wise greater than comparison
def __iadd__(self, arg0: Vector4ui, /) -> Vector4ui
def __iand__(self, arg0: Vector4ui, /) -> Vector4ui
Do bitwise AND of two integral vectors and assign
def __ilshift__(self, arg0: int, /) -> Vector4ui
Do bitwise left shift of an integral vector and assign
def __imod__(self, arg0: int, /) -> Vector4ui
Do modulo of an integral vector and assign
def __imod__(self, arg0: Vector4ui, /) -> Vector4ui
Do module of two integral vectors and assign
def __imul__(self, arg0: int, /) -> Vector4ui
Multiply with a scalar and assign
def __imul__(self, arg0: Vector4ui, /) -> Vector4ui
Multiply a vector component-wise and assign
def __imul__(self, arg0: float, /) -> Vector4ui
Multiply an integral vector with a floating-point number and assign
def __init__(self, arg0: Vector4i, /) -> None
Construct from different underlying type
def __init__(self, arg0: Vector4, /) -> None
Construct from different underlying type
def __init__(self, arg0: Vector4d, /) -> None
Construct from different underlying type
def __init__(self, arg0: buffer, /) -> None
Construct from a buffer
def __init__(self, /) -> None
Default constructor
def __init__(self, arg0: int, /) -> None
Construct a vector with one value for all components
def __init__(self, arg0: int, arg1: int, arg2: int, arg3: int, /) -> None
Constructor
def __init__(self, arg0: typing.Tuple[int, int, int, int], /) -> None
Construct from a tuple
def __invert__(self, /) -> Vector4ui
Bitwise NOT of an integral vector
def __ior__(self, arg0: Vector4ui, /) -> Vector4ui
Do bitwise OR of two integral vectors and assign
def __irshift__(self, arg0: int, /) -> Vector4ui
Do bitwise right shift of an integral vector and assign
def __isub__(self, arg0: Vector4ui, /) -> Vector4ui
Subtract and assign a vector
def __itruediv__(self, arg0: int, /) -> Vector4ui
Divide with a scalar and assign
def __itruediv__(self, arg0: Vector4ui, /) -> Vector4ui
Divide a vector component-wise and assign
def __itruediv__(self, arg0: float, /) -> Vector4ui
Divide an integral vector with a floating-point number and assign
def __ixor__(self, arg0: Vector4ui, /) -> Vector4ui
Do bitwise XOR of two integral vectors and assign
def __le__(self, arg0: Vector4ui, /) -> BoolVector4
Component-wise less than or equal comparison
def __len__() -> int
Vector size. Returns 4.
def __lshift__(self, arg0: int, /) -> Vector4ui
Bitwise left shift of an integral vector
def __lt__(self, arg0: Vector4ui, /) -> BoolVector4
Component-wise less than comparison
def __mod__(self, arg0: int, /) -> Vector4ui
Modulo of an integral vector
def __mod__(self, arg0: Vector4ui, /) -> Vector4ui
Modulo of two integral vectors
def __mul__(self, arg0: int, /) -> Vector4ui
Multiply with a scalar
def __mul__(self, arg0: Vector4ui, /) -> Vector4ui
Multiply a vector component-wise
def __mul__(self, arg0: float, /) -> Vector4ui
Multiply an integral vector with a floating-point number
def __ne__(self, arg0: Vector4ui, /) -> bool
Non-equality comparison
def __or__(self, arg0: Vector4ui, /) -> Vector4ui
Bitwise OR of two integral vectors
def __repr__(self, /) -> str
Object representation
def __rmul__(self, arg0: int, /) -> Vector4ui
Multiply a scalar with a vector
def __rmul__(self, arg0: float, /) -> Vector4ui
Multiply a floating-point number with an integral vector
def __rshift__(self, arg0: int, /) -> Vector4ui
Bitwise right shift of an integral vector
def __rtruediv__(self, arg0: int, /) -> Vector4ui
Divide a vector with a scalar and invert
def __setattr__(self, arg0: str, arg1: object, /) -> None
Vector swizzle
def __setitem__(self, arg0: int, arg1: int, /) -> None
Set a value at given position
def __sub__(self, arg0: Vector4ui, /) -> Vector4ui
Subtract a vector
def __truediv__(self, arg0: int, /) -> Vector4ui
Divide with a scalar
def __truediv__(self, arg0: Vector4ui, /) -> Vector4ui
Divide a vector component-wise
def __truediv__(self, arg0: float, /) -> Vector4ui
Divide an integral vector with a floating-point number
def __xor__(self, arg0: Vector4ui, /) -> Vector4ui
Bitwise XOR of two integral vectors

## Properties

a: int get set
A component
b: int get set
B component
g: int get set
G component
r: int get set
R component
rgb: Vector3ui get set
RGB part of the vector
w: int get set
W component
x: int get set
X component
xy: Vector2ui get set
XY part of the vector
xyz: Vector3ui get set
XYZ part of the vector
y: int get set
Y component
z: int get set
Z component