Pass constant refs instead of objects to LookAt

pull/3/head
Hleb Valoshka 2019-05-20 18:37:33 +03:00
parent deb23a7b80
commit 1125957c83
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ ZRotation(T radians)
* of the component of 'up' that is orthogonal to the z-axis.
*/
template<class T> Eigen::Quaternion<T>
LookAt(Eigen::Matrix<T, 3, 1> from, Eigen::Matrix<T, 3, 1> to, Eigen::Matrix<T, 3, 1> up)
LookAt(const Eigen::Matrix<T, 3, 1>& from, const Eigen::Matrix<T, 3, 1>& to, const Eigen::Matrix<T, 3, 1>& up)
{
Eigen::Matrix<T, 3, 1> n = to - from;
n.normalize();