mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Tween: Fix undefined behavior found by static code analyzer.
Adresses the issue mentioned in https://software.intel.com/en-us/articles/the-ultimate-question-of-programming-refactoring-and-everything
(cherry picked from commit 0157969ccc)
This commit is contained in:
parent
ecb4d41d20
commit
96e0fd5570
1 changed files with 2 additions and 1 deletions
|
|
@ -262,7 +262,8 @@ namespace cubic {
|
|||
|
||||
static real_t out(real_t t, real_t b, real_t c, real_t d)
|
||||
{
|
||||
return c * ((t = t / d - 1) * t * t + 1) + b;
|
||||
t = t / d - 1;
|
||||
return c * (t * t * t + 1) + b;
|
||||
}
|
||||
|
||||
static real_t in_out(real_t t, real_t b, real_t c, real_t d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue