]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sg_inlines.h
Clamp pitch values rather than just dumping an error message.
[simgear.git] / simgear / sg_inlines.h
index 89a8b9b885db790e11b9be0f680cc8c8b7e89361..8e4585d479876f8d39db37146deb9a7f535a9df1 100644 (file)
 
 // return the sign of a value
 template <class T>
-inline const int SG_SIGN(const T x) {
+inline int SG_SIGN(const T x) {
     return x < T(0) ? -1 : 1;
 }
 
 // return the minimum of two values
 template <class T>
-inline const T SG_MIN2(const T a, const T b) {
+inline T SG_MIN2(const T a, const T b) {
     return a < b ? a : b;
 }
 
 // return the minimum of three values
 template <class T>
-inline const T SG_MIN3( const T a, const T b, const T c) {
+inline T SG_MIN3( const T a, const T b, const T c) {
     return (a < b ? SG_MIN2 (a, c) : SG_MIN2 (b, c));
 }
 
 // return the maximum of two values
 template <class T>
-inline const T SG_MAX2(const T a, const T b) {
+inline T SG_MAX2(const T a, const T b) {
     return  a > b ? a : b;
 }
 
 // return the maximum of three values
 template <class T>
-inline const T SG_MAX3 (const T a, const T b, const T c) {
+inline T SG_MAX3 (const T a, const T b, const T c) {
     return (a > b ? SG_MAX2 (a, c) : SG_MAX2 (b, c));
 }