negate

vector3d:negate()

Nega il vettore passato. Nello specifico dato v(x,y,z) diventa v(-x,-y,-z).

Esempio 1. Esempio negate

local v = Vector3d(1, 2, 3)
v:negate()
print("\nnegate(1,2,3) = (" .. tostring(v:X()) .. "," .. tostring(v:Y()) .. "," .. tostring(v:Z()) .. ")")