Browse Source

SceneGraph: fix compilation of Camera class with double as T.

Thanks to @ManuelK89 for the report. Actually I should add proper test
cases for both float and double version, but I have other high-priority
tasks ATM, so it has to wait until later.
pull/162/merge
Vladimír Vondruš 10 years ago
parent
commit
c3e31b69ad
  1. 4
      src/Magnum/SceneGraph/Camera.hpp

4
src/Magnum/SceneGraph/Camera.hpp

@ -49,8 +49,8 @@ template<UnsignedInt dimensions, class T> MatrixTypeFor<dimensions, T> aspectRat
Clip on smaller side = scale smaller side up */
return MatrixTypeFor<dimensions, T>::scaling(Math::Vector<dimensions, T>::pad(
(relativeAspectRatio.x() > relativeAspectRatio.y()) == (aspectRatioPolicy == AspectRatioPolicy::Extend) ?
Vector2(relativeAspectRatio.y()/relativeAspectRatio.x(), T(1)) :
Vector2(T(1), relativeAspectRatio.x()/relativeAspectRatio.y()), T(1)));
Math::Vector2<T>(relativeAspectRatio.y()/relativeAspectRatio.x(), T(1)) :
Math::Vector2<T>(T(1), relativeAspectRatio.x()/relativeAspectRatio.y()), T(1)));
}
}

Loading…
Cancel
Save