You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-25 15:37:42 +00:00
Merge pull request #65325 from TokageItLab/refactor-variant-for-anim
Move some static methods to `Animation` from `Variant` for refactoring `Animation` and `Tween`
This commit is contained in:
@@ -6050,10 +6050,9 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
|
||||
real_t to_diff = fmod(b - a, Math_TAU);
|
||||
to_v = a + fmod(2.0 * to_diff, Math_TAU) - to_diff;
|
||||
}
|
||||
Variant delta_v;
|
||||
Variant::sub(to_v, from_v, delta_v);
|
||||
Variant delta_v = Animation::subtract_variant(to_v, from_v);
|
||||
double duration = to_t - from_t;
|
||||
double fixed_duration = duration - 0.01; // Prevent to overwrap keys...
|
||||
double fixed_duration = duration - UNIT_EPSILON; // Prevent to overwrap keys...
|
||||
for (double delta_t = dur_step; delta_t < fixed_duration; delta_t += dur_step) {
|
||||
Pair<real_t, Variant> keydata;
|
||||
keydata.first = from_t + delta_t;
|
||||
|
||||
Reference in New Issue
Block a user