Garry's Mod Wiki

Vector:Cross

  Vector Vector:Cross( Vector otherVector )

Description

Calculates the cross product of this vector and the passed one.

The cross product of two vectors is a 3-dimensional vector with a direction perpendicular (at right angles) to both of them (according to the right-hand rule), and magnitude equal to the area of parallelogram they span. This is defined as the product of the magnitudes, the sine of the angle between them, and unit (normal) vector n defined by the right-hand rule: :a × b = |a| |b| sin(θ) where a and b are vectors, and is a unit vector (magnitude of 1) perpendicular to both.

Arguments

1 Vector otherVector
Vector to calculate the cross product with.

Returns

1 Vector
The cross product of the two vectors.