From b809925396ee7de4caf618ac8852507e98a402bc Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 15 Aug 2016 17:30:55 +1000 Subject: [PATCH] vector: rename UNIT to ONES unit isn't a normalised vector, so it's misleading to call it a 'unit' vector --- test/vector.cpp | 2 +- vector.cpp | 2 +- vector.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/vector.cpp b/test/vector.cpp index 690e91d6..358db48e 100644 --- a/test/vector.cpp +++ b/test/vector.cpp @@ -109,7 +109,7 @@ main () test_euler (tap); tap.expect (!is_normalised (util::vector3f::ZERO), "zero isn't normalised"); - tap.expect (!is_normalised (util::vector3f::UNIT), "unit is normalised"); + tap.expect (!is_normalised (util::vector3f::ONES), "ones isn't normalised"); return tap.status (); } diff --git a/vector.cpp b/vector.cpp index 62d0ece4..91908448 100644 --- a/vector.cpp +++ b/vector.cpp @@ -135,7 +135,7 @@ util::cartesian_to_spherical (vector<3,T> c) /////////////////////////////////////////////////////////////////////////////// template const util::vector -util::vector::UNIT (T{1}); +util::vector::ONES (T{1}); //----------------------------------------------------------------------------- diff --git a/vector.hpp b/vector.hpp index 715540f1..a6d33fb3 100644 --- a/vector.hpp +++ b/vector.hpp @@ -33,7 +33,7 @@ namespace util { template vector homog (void) const; // constants - static const vector UNIT; + static const vector ONES; static const vector ZERO; void sanity (void) const;