From d01364ca1f5e3f529911708dbe809ee28f9b432b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 23 Aug 2020 16:29:58 +0200 Subject: [PATCH] Math: document more what's cross() good for. --- src/Magnum/Math/Vector3.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index 1488343a1..99ffbe627 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -41,6 +41,11 @@ parallel or antiparallel and length of @cpp 1 @ce when two *normalized* vectors are perpendicular. @f[ \boldsymbol a \times \boldsymbol b = \begin{pmatrix}a_yb_z - a_zb_y \\ a_zb_x - a_xb_z \\ a_xb_y - a_yb_x \end{pmatrix} @f] + +If @f$ \boldsymbol{a} @f$, @f$ \boldsymbol{b} @f$ and @f$ \boldsymbol{c} @f$ +are corners of a triangle in a counterclockwise order, +@f$ (\boldsymbol{c} - \boldsymbol{b}) \times (\boldsymbol{a} - \boldsymbol{b}) @f$ +gives the direction of its normal. @see @ref cross(const Vector2&, const Vector2&), @ref planeEquation() */ template inline Vector3 cross(const Vector3& a, const Vector3& b) {