CROSS(3G)
β¨ CROSS(3G) β¨
okay bestie, welcome to the cross glow-up π
this is the 3G manual page, and we're about to calculate a cross product together like it's the most iconic thing that's ever happened to you.
πΈ NAME πΈ
cross β calculate the cross product of two vectors β¨
π DECLARATION π
here's the receipt, no cap, exactly how you call it:
vec3 cross(vec3 x, vec3 y);
dvec3 cross(dvec3 x, dvec3 y);
π¦ PARAMETERS π¦
xβ specifies the first of two vectors π«Άyβ specifies the second of two vectors π«Ά
π DESCRIPTION π
so basically, cross returns the cross product of two vectors, x and y, i.e.
$\begin{pmatrix} { x[1] \times y[2] - y[1] \times x[2] } \\ { x[2]
\times y[0] - y[2] \times x[0] } \\ { x[0] \times y[1] - y[0] \times
x[1] } \end{pmatrix}$
the way it's literally just three little lines of multiply-and-subtract and it ate that whole thing up ππ₯
π VERSION SUPPORT π
here's the vibe check across every OpenGL Shading Language version, bestie β the versions are 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50 and I'm listing every single one because we do NOT skip details in this house π
cross(vec3) β supported everywhere, periodt.βin1.10,βin1.20,βin1.30,βin1.40,βin1.50,βin3.30,βin4.00,βin4.10,βin4.20,βin4.30,βin4.40,βin4.50βcross(dvec3) β not me showing up late to the party π it's-in1.10,-in1.20,-in1.30,-in1.40,-in1.50,-in3.30, then it finally hits main character energy:βin4.00,βin4.10,βin4.20,βin4.30,βin4.40,βin4.50π
π§ SEE ALSO π§
dot()β the other one, iykyk π
π COPYRIGHT π
Copyright Β© 2011-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT (again, bestie) π
Copyright Β© 2011-2014 Khronos Group
okay that's the whole page π source situation is [FIXME: source] and the date on this baddie is 01/03/2018 β go forth and cross those products, you absolute icon πβ¨
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms