Garry's Mod Wiki

Revision Difference

Vector:Cross#512398

<function name="Cross" parent="Vector" type="classfunc">⤶ <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** &amp;times; **b** = &amp;#124;**a**&amp;#124; &amp;#124;**b**&amp;#124; sin(&amp;theta;) **n&amp;#770;**⤶ where **a** and **b** are vectors, and **n&amp;#770;** is a unit vector (magnitude of 1) perpendicular to both.⤶ </description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="otherVector" type="Vector">Vector to calculate the cross product with.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="Vector">The cross product of the two vectors.</ret>⤶ </rets>⤶ </function>⤶ ⤶