Garry's Mod Wiki

Vector:Mul

Vector:Mul( number multiplier )

Description

Scales the vector by the given number, that means x, y and z are multiplied by that value.

Arguments

1 number multiplier
The value to scale the vector with.

Example

Scales a vector by 250.

a = Vector(1, 1, 1) a:Mul(250) print(a)
Output: 250 250 250

Example

If you don't want to set your vector to the result, and just return a new vector as the result. You can use a ' * ' operator to multiply a vector with a scalar.

a = Vector(1, 1, 1) print(a*250)
Output: 250 250 250

Page Links


Special Pages


Wikis

?

Render Time: 34ms

DB GetPage 8
Generate Html 2
SaveChanges 9
Render Body 0
Render Sidebar 13