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/Color.xml | |
parent | ad3c3e1bbbdbf47fca6d775e01867820040d84f1 (diff) | |
download | redot-engine-540156b387270215f513a68b1cf9ffc909ac381b.tar.gz |
[Core] Rename linear_interpolate to lerp
Diffstat (limited to 'doc/classes/Color.xml')
-rw-r--r-- | doc/classes/Color.xml | 26 |
1 files changed, 13 insertions, 13 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> |