Garry's Mod Wiki

Vector

List of all possible functions to manipulate vectors.

Created by Vector.

Type Name Description
number x or 1 The X component of the vector.
number y or 2 The Y component of the vector.
number z or 3 The Z component of the vector.

Example

Indexing by named component.

local v = Vector( 1, 2, 3 ) print( v.x, v.y, v.z )
Output: 1 2 3

Example

Indexing by number (most efficient!).

local v = Vector( 1, 2, 3 ) print( v[1], v[2], v[3] )
Output: 1 2 3

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 5
Generate Html 6
SaveChanges (1) 13
Render Body 0
Render Sidebar 6