Add Operator

From GMod Wiki

(Redirected from Angle. add)
Jump to: navigation, search

__add is a type of overloaded operator. You might have noticed that some objects have a function called __add. Well, you don't run __add like this - You run __add by typing the name of the object, a plus sign (+) and the name of another object.

Example

For example, you can add vectors:

DescriptionAdds two vectors
Used onNewerShared.png
Code
 
myVector=Vector(1,1,1)+Vector(2,2,2)
 
OutputmyVector becomes vector equal to Vector(3,3,3)
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox