diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-03-16 05:07:33 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2020-04-29 04:02:49 -0400 |
commit | 540156b387270215f513a68b1cf9ffc909ac381b (patch) | |
tree | e5c7f89c9c70294dd1a5aac5461fbb9170868578 /doc/classes | |
parent | ad3c3e1bbbdbf47fca6d775e01867820040d84f1 (diff) |
[Core] Rename linear_interpolate to lerp
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Color.xml | 26 | ||||
-rw-r--r-- | doc/classes/Vector2.xml | 2 | ||||
-rw-r--r-- | doc/classes/Vector3.xml | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index d495be2ffd..1af5c87532 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -149,32 +149,32 @@ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> - <method name="lightened"> + <method name="lerp"> <return type="Color"> </return> - <argument index="0" name="amount" type="float"> + <argument index="0" name="b" type="Color"> + </argument> + <argument index="1" name="t" type="float"> </argument> <description> - Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). + Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. [codeblock] - var green = Color(0.0, 1.0, 0.0) - var lightgreen = green.lightened(0.2) # 20% lighter than regular green + var c1 = Color(1.0, 0.0, 0.0) + var c2 = Color(0.0, 1.0, 0.0) + var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) [/codeblock] </description> </method> - <method name="linear_interpolate"> + <method name="lightened"> <return type="Color"> </return> - <argument index="0" name="b" type="Color"> - </argument> - <argument index="1" name="t" type="float"> + <argument index="0" name="amount" type="float"> </argument> <description> - Returns the linear interpolation with another color. The interpolation factor [code]t[/code] is between 0 and 1. + Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). [codeblock] - var c1 = Color(1.0, 0.0, 0.0) - var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) + var green = Color(0.0, 1.0, 0.0) + var lightgreen = green.lightened(0.2) # 20% lighter than regular green [/codeblock] </description> </method> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7b02a1a4c9..64ebc1fa09 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -193,7 +193,7 @@ Returns the vector's length squared. Prefer this method over [method length] if you need to sort vectors or need the squared length for some formula. </description> </method> - <method name="linear_interpolate"> + <method name="lerp"> <return type="Vector2"> </return> <argument index="0" name="b" type="Vector2"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 600c03ba7d..8c18ca8cc9 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -169,7 +169,7 @@ Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula. </description> </method> - <method name="linear_interpolate"> + <method name="lerp"> <return type="Vector3"> </return> <argument index="0" name="b" type="Vector3"> |