Vector.Mul

From GMod Wiki

Jump to: navigation, search
Function
Syntax Vector:Mul( Float multiplier )
Description:
Performs scalar multiplication on the vector and the argument.
Returns: nil
In Object: Vector
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Vector.Mul]Vector.Mul [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMultiplies Vector(0, 0, 1) with ten and prints out the result.
Used onNewerShared.png
Code
 local vector = Vector(0, 0, 1);
 
 Msg("Before: " .. tostring(vector) .. "\n");
 vector:Mul(10);
 Msg("After: " .. tostring(vector) .. "\n");
OutputBefore: Vector(0, 0, 1)
After: Vector(0, 0, 10)


Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox