In [4]:
from stumpy import Vector
In [5]:
myVec1 = Vector([1,2,3])
myVec2 = Vector([-1,1,1])
In [6]:
print(myVec1 + myVec2)
In [7]:
print(myVec2.getNormalization())
In [8]:
print(myVec1 * 2)
In [9]:
print(myVec1 * myVec2)
In [10]:
print(myVec1.angleDiff(myVec2))
# Use degrees instead of radians
print(myVec1.angleDiff(myVec2, units="deg"))
In [11]:
print(Vector([1,2]).orthogonalTo(Vector([2,-1])))
In [9]:
print(Vector([-7.579,-7.88]).parallelTo(Vector([0,0])))