diff = physics.Vect:sub(vec)
Parameter |
Type |
Description |
---|---|---|
self |
in physics.Vect |
The input vector |
vec |
in physics.Vect |
A vector to subtract from self |
diff |
out physics.Vect |
The vector difference between self and vec |
Returns the vector difference of self and vec.
The Vect class also implements the subtraction operator (-). Therefore vector v2 can be subtracted from v1 with the expression v1 - v2.
Introduced in platform.apiLevel = '2.0'