From c6297f46fe236abbd6c6b06bb9b6bfaa239b49a5 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 14 Apr 2023 14:39:35 +0800 Subject: Unify descriptions of vector methods * is_equal_approx * normalize * length_squared * posmod * posmodv (cherry picked from commit 6cd8e706fae5dacc908efd1a823e3447e01bfa56) --- doc/classes/Vector2.xml | 4 ++-- doc/classes/Vector4.xml | 11 ++++++----- doc/classes/Vector4i.xml | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index fe85ad7df6..9988b892db 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -214,7 +214,7 @@ - Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. @@ -288,7 +288,7 @@ Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized]. - [b]Note:[/b] This function may return incorrect values if the initial vector length is near zero. + [b]Note:[/b] This function may return incorrect values if the input vector length is near zero. diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index 7f71dc23ec..cb7a5b2b2d 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -131,9 +131,9 @@ - + - Returns [code]true[/code] if this vector and [param with] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. + Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. @@ -164,7 +164,8 @@ - Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length]. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. @@ -198,14 +199,14 @@ - Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]. + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]. - Returns a new vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components. + Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components. diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index 0885525d7c..92e01c7ce4 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -65,7 +65,8 @@ - Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length]. + Returns the squared length (squared magnitude) of this vector. + This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. -- cgit v1.2.3