Skip to content

Commit e2f0daf

Browse files
committed
Remove duplicate code in the deprecated Matrix3::look_at function
1 parent f42ff08 commit e2f0daf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/matrix.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,7 @@ impl<S: BaseFloat> Matrix3<S> {
191191
/// `dir`, using `up` for orientation.
192192
#[deprecated = "Use Matrix3::look_to_lh"]
193193
pub fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Matrix3<S> {
194-
let dir = dir.normalize();
195-
let side = up.cross(dir).normalize();
196-
let up = dir.cross(side).normalize();
197-
198-
Matrix3::from_cols(side, up, dir).transpose()
194+
Matrix3::look_to_lh(dir, up)
199195
}
200196

201197
/// Create a rotation matrix that will cause a vector to point at

0 commit comments

Comments
 (0)