什么是 2d 矢量类/操作的numpy
等价物euclid
?(如euclid.Vector2
:)
到目前为止,我有这个。创建两个向量
import numpy as np
loc = np.array([100., 100.])
vel = np.array([30., 10])
loc += vel
# reseting speed to a default value, maintaining direction
vel.normalize()
vel *= 200
loc += vel