From 2db0b13492bfaa795cbd6205aa13821fd4cad5e8 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Sat, 8 Jul 2023 12:56:07 +0200 Subject: [PATCH] Fix wording for scalar multiplication of vectors Also add an example for multiplication with a negative scalar --- tutorials/math/vector_math.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tutorials/math/vector_math.rst b/tutorials/math/vector_math.rst index f65639c3a6f..4cd794ccdd9 100644 --- a/tutorials/math/vector_math.rst +++ b/tutorials/math/vector_math.rst @@ -138,16 +138,19 @@ A vector can be multiplied by a **scalar**: var c = a * 2 # (2, 5) * 2 = (4, 10) var d = b / 3 # (3, 6) / 3 = (1, 2) + var e = d * -2 # (1, 2) * -2 = (-2, -4) .. code-tab:: csharp var c = a * 2; // (2, 5) * 2 = (4, 10) var d = b / 3; // (3, 6) / 3 = (1, 2) + var e = d * -2; // (1, 2) * -2 = (-2, -4) .. image:: img/vector_mult1.png -.. note:: Multiplying a vector by a scalar does not change its direction, only - its magnitude. This is how you **scale** a vector. +.. note:: Multiplying a vector by a positive scalar does not change its direction, only + its magnitude. Multiplying with a negative scalar results in a vector in the + opposite direction. This is how you **scale** a vector. Practical applications ~~~~~~~~~~~~~~~~~~~~~~