From 8c7268664da7ef98f802ec90fa2ba17b4d695847 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 3 Feb 2022 22:16:58 +0100 Subject: Fix integer vector mul/div operators and bindings. * Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively. * Create specializations to allow proper bindings. This fixes #44408 and supersedes #44441 and keeps the same rule of int float returnig float, like with scalars. --- doc/classes/float.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc/classes/float.xml') diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 9effe9d5bf..2dae7275b5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -89,12 +89,12 @@ - + - Multiplies each component of the [Vector2i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector2i] by the given [float]. Returns a [Vector2]. [codeblock] - print(0.9 * Vector2i(10, 20)) # Prints "(0, 0)" + print(0.9 * Vector2i(10, 15)) # Prints "(9, 13.5)" [/codeblock] @@ -106,12 +106,12 @@ - + - Multiplies each component of the [Vector3i] by the given [float] truncated to an integer. + Multiplies each component of the [Vector3i] by the given [float]. Returns a [Vector3]. [codeblock] - print(0.9 * Vector3i(10, 20, 30)) # Prints "(0, 0, 0)" + print(0.9 * Vector3i(10, 15, 20)) # Prints "(9, 13.5, 18)" [/codeblock] -- cgit v1.2.3