Inline redundant variable

This commit is contained in:
Hanno Braun 2024-11-14 17:46:55 +01:00
parent 523e36a212
commit 63448f4469

View File

@ -15,10 +15,9 @@ impl Rotation {
// the model rotates not the camera, so invert the transform
let camera_rotation = camera.rotation.inverse();
let right_vector = camera_rotation.right();
let up_vector = up_vector(&camera_rotation);
let rotation = Transform::rotation(right_vector * angle_x)
let rotation = Transform::rotation(camera_rotation.right() * angle_x)
* Transform::rotation(up_vector * angle_y);
let transform = camera.camera_to_model()