Vector 2-arg constructor and reference semantics
🖼️ Rendering•Updated 2 days ago•0 views
Vector(x,y) defaults z to 0 (vectors are 3D). Assignment shares the reference - v2=v then v2[2]=100 changes v too; use v:clone() for an independent copy.
Does Vector(x,y) auto-add z=0 / do vector vars share memory
Vector(x,y) defaults z to 0 (vectors are 3D). Assignment shares the reference - v2=v then v2[2]=100 changes v too; use v:clone() for an independent copy.