summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-29 15:50:00 +0200
committerGitHub <noreply@github.com>2020-04-29 15:50:00 +0200
commit58435b0c917fd93d4244ed672e7fadd076dae608 (patch)
treeb41bc67f056615084a111fdad09e25033e2d21a0 /doc
parent1d45a269f87ff38e04169e6aa85d9ecd73fb3473 (diff)
parent540156b387270215f513a68b1cf9ffc909ac381b (diff)
Merge pull request #20371 from aaronfranke/vector-lerp
[Core] [Mono] [GDNative] Rename "linear_interpolate" methods to "lerp"
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Color.xml26
-rw-r--r--doc/classes/Vector2.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--doc/translations/classes.pot4
-rw-r--r--doc/translations/fr.po4
5 files changed, 19 insertions, 19 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">
diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot
index 641d80c5ca..d5351403dd 100644
--- a/doc/translations/classes.pot
+++ b/doc/translations/classes.pot
@@ -480,7 +480,7 @@ msgid ""
"[float], the return value is a [float].\n"
"If both are of the same vector type ([Vector2], [Vector3] or [Color]), the "
"return value will be of the same type ([code]lerp[/code] then calls the "
-"vector type's [code]linear_interpolate[/code] method).\n"
+"vector type's [code]lerp[/code] method).\n"
"[codeblock]\n"
"lerp(0, 4, 0.75) # Returns 3.0\n"
"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)\n"
@@ -12703,7 +12703,7 @@ msgid ""
"[codeblock]\n"
"var c1 = Color(1.0, 0.0, 0.0)\n"
"var c2 = Color(0.0, 1.0, 0.0)\n"
-"var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, "
+"var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, "
"255)\n"
"[/codeblock]"
msgstr ""
diff --git a/doc/translations/fr.po b/doc/translations/fr.po
index 6926376c05..51313f873b 100644
--- a/doc/translations/fr.po
+++ b/doc/translations/fr.po
@@ -490,7 +490,7 @@ msgid ""
"[float], the return value is a [float].\n"
"If both are of the same vector type ([Vector2], [Vector3] or [Color]), the "
"return value will be of the same type ([code]lerp[/code] then calls the "
-"vector type's [code]linear_interpolate[/code] method).\n"
+"vector type's [code]lerp[/code] method).\n"
"[codeblock]\n"
"lerp(0, 4, 0.75) # Returns 3.0\n"
"lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)\n"
@@ -12713,7 +12713,7 @@ msgid ""
"[codeblock]\n"
"var c1 = Color(1.0, 0.0, 0.0)\n"
"var c2 = Color(0.0, 1.0, 0.0)\n"
-"var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, "
+"var li_c = c1.lerp(c2, 0.5) # A color of an RGBA(128, 128, 0, "
"255)\n"
"[/codeblock]"
msgstr ""