Vector
index
/Users/amos/Documents/Database/Mental/Programming/python/lib/avatar/Personal2/www.amos/Python/lib/imagelib/Drawing/Vector.py

A class for multidimensional vectors, with arithmetic, and rotation.

 
Classes
       
Vector
Vector2D

 
class Vector
    A class that implements vectors as ordered tuples in any (integral) dimension.
 
Note that Vector(3) returns (0, 0, 0), but Vector(3, 3) returns (3, 3).
 
  Methods defined here:
Distance(self, other)
MaxDistance(self, other)
Rotate(self, xAngle, vPerp)
__add__(self, other)
__div__(self, xDiv)
__init__(self, *tp)
__len__(self)
__mul__(self, xMul)
__neg__(self)
__repr__(self)
__rmul__(self, xMul)
__str__(self)
__sub__(self, other)
copy(self)
dot(self, other)
length(self)
list(self)
max(self, other)
min(self, other)
tuple(self)

 
class Vector2D(Vector)
     Methods defined here:
Perpendicular(self)
Rotate(self, xAngle)
Toward(self, other)
__init__(self, tp)

Methods inherited from Vector:
Distance(self, other)
MaxDistance(self, other)
__add__(self, other)
__div__(self, xDiv)
__len__(self)
__mul__(self, xMul)
__neg__(self)
__repr__(self)
__rmul__(self, xMul)
__str__(self)
__sub__(self, other)
copy(self)
dot(self, other)
length(self)
list(self)
max(self, other)
min(self, other)
tuple(self)

 
Functions
       
atan2(...)
atan2(y, x)
 
Return the arc tangent (measured in radians) of y/x.
Unlike atan(y/x), the signs of both x and y are considered.
cos(...)
cos(x)
 
Return the cosine of x (measured in radians).
sin(...)
sin(x)
 
Return the sine of x (measured in radians).
sqrt(...)
sqrt(x)
 
Return the square root of x.