mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix missing <cmath> include for Gentoo
This commit is contained in:
@@ -24,33 +24,41 @@
|
|||||||
#ifndef BEAST_ARITHMETIC_H_INCLUDED
|
#ifndef BEAST_ARITHMETIC_H_INCLUDED
|
||||||
#define BEAST_ARITHMETIC_H_INCLUDED
|
#define BEAST_ARITHMETIC_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
// Some indispensible min/max functions
|
// Some indispensible min/max functions
|
||||||
|
|
||||||
/** Returns the larger of two values. */
|
/** Returns the larger of two values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmax (const Type a, const Type b) { return (a < b) ? b : a; }
|
inline Type bmax (const Type a, const Type b)
|
||||||
|
{ return (a < b) ? b : a; }
|
||||||
|
|
||||||
/** Returns the larger of three values. */
|
/** Returns the larger of three values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmax (const Type a, const Type b, const Type c) { return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); }
|
inline Type bmax (const Type a, const Type b, const Type c)
|
||||||
|
{ return (a < b) ? ((b < c) ? c : b) : ((a < c) ? c : a); }
|
||||||
|
|
||||||
/** Returns the larger of four values. */
|
/** Returns the larger of four values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmax (const Type a, const Type b, const Type c, const Type d) { return bmax (a, bmax (b, c, d)); }
|
inline Type bmax (const Type a, const Type b, const Type c, const Type d)
|
||||||
|
{ return bmax (a, bmax (b, c, d)); }
|
||||||
|
|
||||||
/** Returns the smaller of two values. */
|
/** Returns the smaller of two values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmin (const Type a, const Type b) { return (b < a) ? b : a; }
|
inline Type bmin (const Type a, const Type b)
|
||||||
|
{ return (b < a) ? b : a; }
|
||||||
|
|
||||||
/** Returns the smaller of three values. */
|
/** Returns the smaller of three values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmin (const Type a, const Type b, const Type c) { return (b < a) ? ((c < b) ? c : b) : ((c < a) ? c : a); }
|
inline Type bmin (const Type a, const Type b, const Type c)
|
||||||
|
{ return (b < a) ? ((c < b) ? c : b) : ((c < a) ? c : a); }
|
||||||
|
|
||||||
/** Returns the smaller of four values. */
|
/** Returns the smaller of four values. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
inline Type bmin (const Type a, const Type b, const Type c, const Type d) { return bmin (a, bmin (b, c, d)); }
|
inline Type bmin (const Type a, const Type b, const Type c, const Type d)
|
||||||
|
{ return bmin (a, bmin (b, c, d)); }
|
||||||
|
|
||||||
/** Scans an array of values, returning the minimum value that it contains. */
|
/** Scans an array of values, returning the minimum value that it contains. */
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
@@ -115,7 +123,6 @@ void findMinAndMax (const Type* values, int numValues, Type& lowest, Type& highe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
/** Constrains a value to keep it within a given range.
|
/** Constrains a value to keep it within a given range.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user