mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-26 13:47:12 +01:00
Document lerp_angle behavior when angles are approximately PI apart
(cherry picked from commit 492903a0b221ac50c5db0426d22db2457f946b58)
This commit is contained in:
parent
019b8f009b
commit
4fe20cbfb1
@ -521,6 +521,7 @@
|
|||||||
rotation = lerp_angle(min_angle, max_angle, elapsed)
|
rotation = lerp_angle(min_angle, max_angle, elapsed)
|
||||||
elapsed += delta
|
elapsed += delta
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
[b]Note:[/b] This method lerps through the shortest path between [code]from[/code] and [code]to[/code]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="linear2db">
|
<method name="linear2db">
|
||||||
|
Loading…
Reference in New Issue
Block a user