From c9b467ac154d4cda4b52813943bd26c67f40c6de Mon Sep 17 00:00:00 2001 From: Anutrix Date: Sun, 30 Oct 2022 17:53:41 +0530 Subject: Added missing docs to built-in types float and int --- doc/classes/float.xml | 13 +++++++++++++ doc/classes/int.xml | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/doc/classes/float.xml b/doc/classes/float.xml index d7232bb0e9..e3938fb5d5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -114,12 +114,17 @@ + Multiplies each component of the [Vector4] by the given [float]. + Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4]. + [codeblock] + print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)" + [/codeblock] @@ -140,12 +145,20 @@ + Raises a [float] to a power of a [float]. + [codeblock] + print(39.0625**0.25) # 2.5 + [/codeblock] + Raises a [float] to a power of an [int]. The result is a [float]. + [codeblock] + print(0.9**3) # 0.729 + [/codeblock] diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 868a8e9944..689cb7fe8e 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -161,12 +161,14 @@ + Multiplies each component of the [Vector4] by the given [int]. + Multiplies each component of the [Vector4i] by the given [int]. @@ -187,12 +189,20 @@ + Raises an [int] to a power of a [float]. The result is a [float]. + [codeblock] + print(8**0.25) # 1.68179283050743 + [/codeblock] + Raises an [int] to a power of a [int]. + [codeblock] + print(5**5) # 3125 + [/codeblock] -- cgit v1.2.3