diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 18:51:59 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 18:51:59 +0100 |
commit | d2e1b4b9f0cbd67e38773ad610912ff382cf4d4f (patch) | |
tree | 5e399c44229a972d289048b19627662a28c40095 /tests/scene/test_animation.h | |
parent | 62ed75df9cbac7dd1d73631b5d542000a26325b5 (diff) | |
parent | 83634119d42595498e42685556a577c12145e20b (diff) |
Merge pull request #68118 from aaronfranke/quat-from-euler
Replace Quaternion Euler constructor with `from_euler` method
Diffstat (limited to 'tests/scene/test_animation.h')
-rw-r--r-- | tests/scene/test_animation.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/scene/test_animation.h b/tests/scene/test_animation.h index 9199713fd9..ca80f0ecab 100644 --- a/tests/scene/test_animation.h +++ b/tests/scene/test_animation.h @@ -140,13 +140,13 @@ TEST_CASE("[Animation] Create 3D rotation track") { Ref<Animation> animation = memnew(Animation); const int track_index = animation->add_track(Animation::TYPE_ROTATION_3D); animation->track_set_path(track_index, NodePath("Enemy:rotation")); - animation->rotation_track_insert_key(track_index, 0.0, Quaternion(Vector3(0, 1, 2))); - animation->rotation_track_insert_key(track_index, 0.5, Quaternion(Vector3(3.5, 4, 5))); + animation->rotation_track_insert_key(track_index, 0.0, Quaternion::from_euler(Vector3(0, 1, 2))); + animation->rotation_track_insert_key(track_index, 0.5, Quaternion::from_euler(Vector3(3.5, 4, 5))); CHECK(animation->get_track_count() == 1); CHECK(!animation->track_is_compressed(0)); - CHECK(Quaternion(animation->track_get_key_value(0, 0)).is_equal_approx(Quaternion(Vector3(0, 1, 2)))); - CHECK(Quaternion(animation->track_get_key_value(0, 1)).is_equal_approx(Quaternion(Vector3(3.5, 4, 5)))); + CHECK(Quaternion(animation->track_get_key_value(0, 0)).is_equal_approx(Quaternion::from_euler(Vector3(0, 1, 2)))); + CHECK(Quaternion(animation->track_get_key_value(0, 1)).is_equal_approx(Quaternion::from_euler(Vector3(3.5, 4, 5)))); Quaternion r_interpolation; |