Vector.Cross

From GMod Wiki

Jump to: navigation, search
Function
Syntax Vector:Cross( Vector )
Description:
Returns the cross product of the object vector and the parameter vector.
Returns: Vector
In Object: Vector
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Vector.Cross]Vector.Cross [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionGetting cross product of Vector(1, 2, 3) and Vector(4, 5, 6)
Used onNewerShared.png
Code
 
    local cross = Vector(1, 2, 3):Cross(Vector(4, 5, 6))
    print("Cross product of Vector(1, 2, 3) and Vector(4, 5, 6): " .. tostring(cross))
 
OutputCross product of Vector(1, 2, 3) and Vector(4, 5, 6): -3.0000 6.0000 -3.0000
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox