| |
- __builtin__.object
-
- Vec2d
class Vec2d(__builtin__.object) |
|
2d vector class, supports vector and scalar operators,
and also provides a bunch of high level functions |
|
Methods defined here:
- __abs__(self)
- __add__(self, other)
- # Addition
- __and__(self, other)
- __div__(self, other)
- # Division
- __divmod__(self, other)
- __eq__(self, other)
- # Comparison
- __floordiv__(self, other)
- __getitem__(self, key)
- __getslice__(self, i, j)
- __getstate__(self)
- __iadd__(self, other)
- __idiv__(self, other)
- __ifloordiv__(self, other)
- __imul__(self, other)
- __init__(self, x_or_pair, y=None)
- __invert__(self)
- __isub__(self, other)
- __itruediv__(self, other)
- __len__(self)
- __lshift__(self, other)
- # Bitwise operators
- __mod__(self, other)
- # Modulo
- __mul__(self, other)
- # Multiplication
- __ne__(self, other)
- __neg__(self)
- # Unary operations
- __nonzero__(self)
- __or__(self, other)
- __pos__(self)
- __pow__(self, other)
- # Exponentation
- __radd__ = __add__(self, other)
- __rand__ = __and__(self, other)
- __rdiv__(self, other)
- __rdivmod__(self, other)
- __repr__(self)
- # String representaion (for debugging)
- __rfloordiv__(self, other)
- __rlshift__(self, other)
- __rmod__(self, other)
- __rmul__ = __mul__(self, other)
- __ror__ = __or__(self, other)
- __rpow__(self, other)
- __rrshift__(self, other)
- __rshift__(self, other)
- __rsub__(self, other)
- __rtruediv__(self, other)
- __rxor__ = __xor__(self, other)
- __setitem__(self, key, value)
- __setslice__(self, i, j, seq)
- __setstate__(self, dict)
- __sub__(self, other)
- # Subtraction
- __truediv__(self, other)
- __xor__(self, other)
- convert_to_basis(self, x_vector, y_vector)
- cross(self, other)
- dot(self, other)
- get_angle(self)
- get_angle_between(self, other)
- get_dist_sqrd(self, other)
- get_distance(self, other)
- get_length(self)
- get_length_sqrd(self)
- # vectory functions
- interpolate_to(self, other, range)
- normalize_return_length(self)
- normalized(self)
- perpendicular(self)
- perpendicular_normal(self)
- projection(self, other)
- rotate(self, angle_degrees)
- rotated(self, angle_degrees)
Data descriptors defined here:
- angle
- gets or sets the angle of a vector
- length
- gets or sets the magnitude of the vector
- x
- y
| |