|
__init__(self,
x_or_pair=None,
y=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
|
|
|
|
|
__setitem__(self,
key,
value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__floordiv__(self,
other) |
|
|
|
__rfloordiv__(self,
other) |
|
|
|
__ifloordiv__(self,
other) |
|
|
|
|
|
__rtruediv__(self,
other) |
|
|
|
__itruediv__(self,
other) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rotate(self,
angle_radians)
Rotate the vector by angle_radians radians. |
|
|
|
rotated(self,
angle_radians)
Create and return a new vector by rotating this vector by
angle_radians radians. |
|
|
|
rotate_degrees(self,
angle_degrees)
Rotate the vector by angle_degrees degrees. |
|
|
|
rotated_degrees(self,
angle_degrees)
Create and return a new vector by rotating this vector by
angle_degrees degrees. |
|
|
|
|
|
|
|
get_angle_between(self,
other)
Get the angle between the vector and the other in radians |
|
|
|
|
|
normalized(self)
Get a normalized copy of the vector
Note: This function will return 0 if the length of the vector is 0. |
|
|
|
|
|
|
|
perpendicular_normal(self) |
|
|
|
dot(self,
other)
v1.dot(v2) -> v1.x*v2.x + v1.y*v2.y |
|
|
|
get_distance(self,
other)
The distance between the vector and other vector |
|
|
|
get_dist_sqrd(self,
other)
The squared distance between the vector and other vector
It is more efficent to use this method than to call get_distance()
first and then do a sqrt() on the result. |
|
|
|
|
|
cross(self,
other)
v1.cross(v2) -> v1.x*v2.y - v2.y*v1.x |
|
|
|
interpolate_to(self,
other,
range) |
|
|
|
convert_to_basis(self,
x_vector,
y_vector) |
|
|
|
cpvrotate(self,
other)
Uses complex multiplication to rotate this vector by the other. |
|
|
|
cpvunrotate(self,
other)
The inverse of cpvrotate |
|
|
|
|
|
|
|
|
Inherited from _ctypes.Structure :
__new__
Inherited from unreachable._CData :
__ctypes_from_outparam__ ,
__hash__ ,
__reduce__
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|