vector: rename UNIT to ONES

unit isn't a normalised vector, so it's misleading to call it a 'unit'
vector
This commit is contained in:
Danny Robson 2016-08-15 17:30:55 +10:00
parent 86aec9d9dd
commit b809925396
3 changed files with 3 additions and 3 deletions

View File

@ -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 ();
}

View File

@ -135,7 +135,7 @@ util::cartesian_to_spherical (vector<3,T> c)
///////////////////////////////////////////////////////////////////////////////
template <size_t S, typename T>
const util::vector<S,T>
util::vector<S,T>::UNIT (T{1});
util::vector<S,T>::ONES (T{1});
//-----------------------------------------------------------------------------

View File

@ -33,7 +33,7 @@ namespace util {
template <size_t D> vector<D,T> homog (void) const;
// constants
static const vector<S,T> UNIT;
static const vector<S,T> ONES;
static const vector<S,T> ZERO;
void sanity (void) const;