MeatEngine :: Math :: vector :: Vec3f :: Class Vec3f
[hide private]
[frames] | no frames]

Class Vec3f

source code

Instance Methods [hide private]
 
__init__(self, x, y, z)
Vector constructor
source code
 
add(self, v)
Vector Addiction
source code
 
sub(self, v)
Vector Subtraction
source code
 
mul(self, s)
Scalar Multiplication
source code
 
dot(self, v)
Dot product.
source code
 
cross(self, v)
Cross product.
source code
 
mag(self)
length
source code
 
magSqr(self)
Square of the magnitude.
source code
 
norm(self)
normalize
source code
 
__str__(self) source code
Method Details [hide private]

sub(self, v)

source code 

Vector Subtraction

returns self-v

mul(self, s)

source code 

Scalar Multiplication

returns self*s (scalar multiplication)

cross(self, v)

source code 

Cross product.

self cross v

mag(self)

source code 

length

return the magnitude(length) of the vector.

magSqr(self)

source code 

Square of the magnitude.

this is faster than calling mag(), and is often just as useful.

norm(self)

source code 

normalize

returns a unit vector in the same direction as this vector.