From e134d911e6f8b2bd521dd5ba66a9de6e0deec08f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 24 Aug 2017 12:27:18 +1000 Subject: [PATCH] geom/ray: reinsert is_normalised check for direction param --- geom/ray.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/geom/ray.hpp b/geom/ray.hpp index 12f8aa13..5b2d13f6 100644 --- a/geom/ray.hpp +++ b/geom/ray.hpp @@ -33,11 +33,15 @@ namespace util::geom { constexpr ray (point _origin, vector _direction) noexcept: origin (_origin), direction (_direction) - { ; } + { + CHECK (is_normalised (direction)); + } constexpr ray (point _origin, point _distant) noexcept: ray (_origin, _origin.to (_distant )) - { ; } + { + CHECK (is_normalised (direction)); + } //---------------------------------------------------------------------