From ba19aebe88931c7d55a43f10c626e5f6a8941d93 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 6 Mar 2018 18:13:46 +1100 Subject: [PATCH] point/vector: give homog a default dimensionality --- point.hpp | 2 +- vector.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/point.hpp b/point.hpp index 8026cd5c..c919afc5 100644 --- a/point.hpp +++ b/point.hpp @@ -39,7 +39,7 @@ namespace util { /// expand point to use homogenous coordinates of a higher dimension. /// ie, fill with (0,..,0,1) - template + template point homog (void) const { diff --git a/vector.hpp b/vector.hpp index 8116d10b..c5307b43 100644 --- a/vector.hpp +++ b/vector.hpp @@ -35,7 +35,8 @@ namespace util { using coord::base>::base; // representations - template vector homog (void) const + template + vector homog (void) const { static_assert (D > S, "reducing size loses data"); return (*this).template redim (0.f);