I've been looking at way to make my vector lib more versatile. Take a look at this vector method and give me your opinion on any speed issues it might create. It basically lets you write vector addition in 2 different ways. If no v2 vector is specified then it ignores it etc.
' Purpose: Add Vectors ' Returns: Self ' Example 1: v1=v1+v2 would be written v1.Add( v2 ) ' Example 2: v1=v2+v3 would be written v1.Add( v2, v3) Method Add( v1:TVector3, v2:TVector3 ) If v2 self.x = v1.x + v2.x self.y = v1.y + v2.y self.z = v1.z + v2.z else self.x :+ v1.x self.y :+ v1.y self.z :+ v1.z endif End Function