Added signOrZero template method, and to Matrix_implementation.cpp usage of this
method in the get(Quat&) code.
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user