pip install kitvector
Note
This module is just some basic vector operations.
import kitvector
v=kitvector.Vector((1, 2, 3))
u=kitvector.Vector((4, 5, 6))
Note
Multiply the vector u by a scalar k.
v.mul_k(3) # output: Vector(3, 6, 9)
Note
The inner product of the vector.
Vactor.dot(v, u)
Note
The outer product of the vector.
Vactor.cross(v, u)
Note
The size of the vector.
v.magnitude # output: 3.7416573867739413
Note
Unit Vector.
v.unit_vector
Note
projection of Vector.
Vector.projection(v, u)
Note
Parallelogram area.
Vector.area(v, u)
Note
Triangle area.
Vector.triangle(v, u)
Note
Return cos0.
Vector.angle(v, u)