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.Rad class

Radians

Static methods

def zero_init() -> Rad
Construct a zero value

Special methods

def __add__(self, arg0: Rad, /) -> Rad
Add a value
def __eq__(self, arg0: Rad, /) -> bool
Equality comparison
def __float__(self, /) -> float
Conversion to underlying type
def __ge__(self, arg0: Rad, /) -> bool
Greater than or equal comparison
def __getstate__(self, /) -> float
Dumps the in-memory representation as a float
def __gt__(self, arg0: Rad, /) -> bool
Greater than comparison
def __iadd__(self, arg0: Rad, /) -> Rad
Add and assign a value
def __imul__(self, arg0: float, /) -> Rad
Multiply with a number and assign
def __init__(self, arg0: Deg, /) -> None
Conversion from degrees
def __init__(self, /) -> None
Default constructor
def __init__(self, arg0: float, /) -> None
Explicit conversion from a unitless type
def __isub__(self, arg0: Rad, /) -> Rad
Subtract and assign a value
def __itruediv__(self, arg0: float, /) -> Rad
Divide with a number and assign
def __le__(self, arg0: Rad, /) -> bool
Less than or equal comparison
def __lt__(self, arg0: Rad, /) -> bool
Less than comparison
def __mul__(self, arg0: float, /) -> Rad
Multiply with a number
def __ne__(self, arg0: Rad, /) -> bool
Non-equality comparison
def __neg__(self, /) -> Rad
Negated value
def __repr__(self, /) -> str
Object representation
def __setstate__(self, arg0: float, /) -> None
Uses the float as the in-memory representation
def __sub__(self, arg0: Rad, /) -> Rad
Subtract a value
def __truediv__(self, arg0: float, /) -> Rad
Divide with a number
def __truediv__(self, arg0: Rad, /) -> float
Ratio of two values