Added signOrZero template method, and to Matrix_implementation.cpp usage of this

method in the get(Quat&) code.
This commit is contained in:
Robert Osfield
2007-05-09 09:26:33 +00:00
parent 681bf12333
commit 6c74589014
3 changed files with 19 additions and 3 deletions

View File

@@ -167,6 +167,9 @@ inline T clampBetween(T v,T minimum, T maximum)
template<typename T>
inline T sign(T v) { return v<(T)0?(T)-1:(T)1; }
template<typename T>
inline T signOrZero(T v) { return v<(T)0 ? (T)-1 : ( v>(T)0 ? (T)1 : 0 ); }
template<typename T>
inline T square(T v) { return v*v; }