From 0df6244b8bdd7f94e6fa848d347677ca7f041e46 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 3 Aug 2014 18:51:41 -0700 Subject: [PATCH] Bit of code clean up in LookAt --- src/camera.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/camera.cc b/src/camera.cc index de53ecf..31cb36c 100644 --- a/src/camera.cc +++ b/src/camera.cc @@ -108,13 +108,9 @@ Camera::LookAt(const Vector3& pt) mRight = Vector3::Y.cross(mDirection).normalize(); mUp = mDirection.cross(mRight); - mDirection *= directionLength; - if (handedness > 0.0) { - mRight *= rightLength; - } else { - mRight *= -rightLength; - } + mDirection *= directionLength; + mRight *= (handedness > 0.0) ? rightLength : -rightLength; mUp *= upLength; }