matrix: check that the look_at up vector is normalised

This commit is contained in:
Danny Robson 2016-10-07 17:32:28 +11:00
parent 2e54950b1a
commit a78ed2b879

View File

@ -280,6 +280,8 @@ matrix<S,T>::look_at (util::point<3,T> eye,
util::point<3,T> target,
util::vector<3,T> up)
{
CHECK (is_normalised (up));
auto forward = normalised (eye.to (target));
auto side = normalised (cross (forward, up));
up = cross (side, forward);