diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2019-08-04 18:50:28 -0700 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2019-08-17 18:31:55 -0400 |
commit | 092346d82b9e3a7e3f957e7d239db09fc4b4a0c4 (patch) | |
tree | 01b0c261f4f0169b25ed971b838dc3272f80ea16 /doc/classes | |
parent | cc9f2a2d8bf36e7244e7291ad7fdb32a3e3f2ef2 (diff) |
Add Vector2/3 sign and posmod functions, misc additions
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Vector2.xml | 33 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 31 |
2 files changed, 60 insertions, 4 deletions
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 237b596fad..66c4849358 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -203,6 +203,24 @@ Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. </description> </method> + <method name="posmod"> + <return type="Vector2"> + </return> + <argument index="0" name="mod" type="float"> + </argument> + <description> + Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code]. + </description> + </method> + <method name="posmodv"> + <return type="Vector2"> + </return> + <argument index="0" name="mod" type="float"> + </argument> + <description> + Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components. + </description> + </method> <method name="project"> <return type="Vector2"> </return> @@ -237,6 +255,13 @@ Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> + <method name="sign"> + <return type="Vector2"> + </return> + <description> + Returns the vector with each component set to one or negative one, depending on the signs of the components. + </description> + </method> <method name="slerp"> <return type="Vector2"> </return> @@ -284,6 +309,12 @@ </member> </members> <constants> + <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis]. + </constant> + <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. + </constant> <constant name="ZERO" value="Vector2( 0, 0 )"> Zero vector. </constant> @@ -291,7 +322,7 @@ One vector. </constant> <constant name="INF" value="Vector2( inf, inf )"> - Infinite vector. + Infinity vector. </constant> <constant name="LEFT" value="Vector2( -1, 0 )"> Left unit vector. diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 3e1083ab69..4631eb7300 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Vector3" category="Built-In Types" version="3.2"> <brief_description> - Vector class, which performs basic 3D vector math operations. + Vector used for 3D math. </brief_description> <description> - Vector3 is one of the core classes of the engine, and includes several built-in helper functions to perform basic vector math operations. + 3-element structure that can be used to represent positions in 3D space or any other pair of numeric values. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -202,6 +202,24 @@ Returns the outer product with [code]b[/code]. </description> </method> + <method name="posmod"> + <return type="Vector3"> + </return> + <argument index="0" name="mod" type="float"> + </argument> + <description> + Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]mod[/code]. + </description> + </method> + <method name="posmodv"> + <return type="Vector3"> + </return> + <argument index="0" name="mod" type="float"> + </argument> + <description> + Returns a vector composed of the [code]fposmod[/code] of this vector's components and [code]modv[/code]'s components. + </description> + </method> <method name="project"> <return type="Vector3"> </return> @@ -238,6 +256,13 @@ Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> + <method name="sign"> + <return type="Vector3"> + </return> + <description> + Returns the vector with each component set to one or negative one, depending on the signs of the components. + </description> + </method> <method name="slerp"> <return type="Vector3"> </return> @@ -304,7 +329,7 @@ One vector. </constant> <constant name="INF" value="Vector3( inf, inf, inf )"> - Infinite vector. + Infinity vector. </constant> <constant name="LEFT" value="Vector3( -1, 0, 0 )"> Left unit vector. |