-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: impl Ease
for Isometry[2/3]d
#17545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with one minor suggestion.
#[test] | ||
fn ease_quats() { | ||
let quat_start = Quat::from_axis_angle(Vec3::Z, 0.0); | ||
let quat_end = Quat::from_axis_angle(Vec3::Z, 90.0_f32.to_radians()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: instead of each case giving the angle in degrees, maybe define one angle and multiply it by the curve parameter per case?
let angle = 90.0_f32.to_radians();
let quat_end = Quat::from_axis_angle(Vec3::Z, angle);
...
assert_abs_diff_eq!(quat_curve.sample(0.5).unwrap(), Quat::from_axis_angle(Vec3::Z, 0.5 * angle));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will do!
# Objective - We kind of missed out on implementing the `Ease` trait for some objects like `Isometry2D` and `Isometry3D` even though it makes sense and isn't that hard - Fixes bevyengine#17539 ## Testing - wrote some minimal tests - ~~noticed that quat easing isn't working as expected yet~~ I just confused degrees and radians once again 🙈
# Objective - We kind of missed out on implementing the `Ease` trait for some objects like `Isometry2D` and `Isometry3D` even though it makes sense and isn't that hard - Fixes bevyengine#17539 ## Testing - wrote some minimal tests - ~~noticed that quat easing isn't working as expected yet~~ I just confused degrees and radians once again 🙈
Objective
Ease
trait for some objects likeIsometry2D
andIsometry3D
even though it makes sense and isn't that hardEase
forIsometry3d
#17539Testing
noticed that quat easing isn't working as expected yetI just confused degrees and radians once again 🙈