geom/ray: reinsert is_normalised check for direction param

This commit is contained in:
Danny Robson 2017-08-24 12:27:18 +10:00
parent d8e4354f22
commit e134d911e6

View File

@ -33,11 +33,15 @@ namespace util::geom {
constexpr ray (point<S,T> _origin, vector<S,T> _direction) noexcept: constexpr ray (point<S,T> _origin, vector<S,T> _direction) noexcept:
origin (_origin), origin (_origin),
direction (_direction) direction (_direction)
{ ; } {
CHECK (is_normalised (direction));
}
constexpr ray (point<S,T> _origin, point <S,T> _distant) noexcept: constexpr ray (point<S,T> _origin, point <S,T> _distant) noexcept:
ray (_origin, _origin.to (_distant )) ray (_origin, _origin.to (_distant ))
{ ; } {
CHECK (is_normalised (direction));
}
//--------------------------------------------------------------------- //---------------------------------------------------------------------