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:
parent
86aec9d9dd
commit
b809925396
@ -109,7 +109,7 @@ main ()
|
|||||||
test_euler (tap);
|
test_euler (tap);
|
||||||
|
|
||||||
tap.expect (!is_normalised (util::vector3f::ZERO), "zero isn't normalised");
|
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 ();
|
return tap.status ();
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ util::cartesian_to_spherical (vector<3,T> c)
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
const util::vector<S,T>
|
const util::vector<S,T>
|
||||||
util::vector<S,T>::UNIT (T{1});
|
util::vector<S,T>::ONES (T{1});
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -33,7 +33,7 @@ namespace util {
|
|||||||
template <size_t D> vector<D,T> homog (void) const;
|
template <size_t D> vector<D,T> homog (void) const;
|
||||||
|
|
||||||
// constants
|
// constants
|
||||||
static const vector<S,T> UNIT;
|
static const vector<S,T> ONES;
|
||||||
static const vector<S,T> ZERO;
|
static const vector<S,T> ZERO;
|
||||||
|
|
||||||
void sanity (void) const;
|
void sanity (void) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user