Commit f9bdbf08 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

STYLE: doxygen comments for min/max functions

parent 3ebdae6b
......@@ -58,6 +58,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Compare two values for equality
template<class T>
inline bool equal(const T& s1, const T& s2)
{
......@@ -65,24 +66,25 @@ inline bool equal(const T& s1, const T& s2)
}
#define MAXMINPOW(retType, type1, type2) \
\
MAXMIN(retType, type1, type2) \
\
inline double pow(const type1 s, const type2 e) \
{ \
return ::pow(double(s), double(e)); \
#define MAXMINPOW(retType, type1, type2) \
\
MAXMIN(retType, type1, type2) \
\
/** \brief Raise base to the power expon */ \
inline double pow(const type1 base, const type2 expon) \
{ \
return ::pow(double(base), double(expon)); \
}
MAXMINPOW(double, double, double)
MAXMINPOW(double, double, float)
MAXMINPOW(double, float, double)
MAXMINPOW(float, float, float)
MAXMINPOW(double, double, int)
MAXMINPOW(double, int, double)
MAXMINPOW(double, double, long)
MAXMINPOW(double, long, double)
MAXMINPOW(float, float, float)
MAXMINPOW(float, float, int)
MAXMINPOW(float, int, float)
MAXMINPOW(float, float, long)
......
......@@ -44,16 +44,18 @@ SourceFiles
namespace Foam
{
#define MAXMIN(retType, type1, type2) \
\
inline retType max(const type1 s1, const type2 s2) \
{ \
return (s1 > s2)? s1: s2; \
} \
\
inline retType min(const type1 s1, const type2 s2) \
{ \
return (s1 < s2)? s1: s2; \
#define MAXMIN(retType, type1, type2) \
\
/** \brief Floating/integral min. Use stdFoam::min() to preserve references */ \
inline retType min(const type1 s1, const type2 s2) \
{ \
return (s1 < s2) ? s1 : s2; \
} \
\
/** \brief Floating/integral max. Use stdFoam::max() to preserve references */ \
inline retType max(const type1 s1, const type2 s2) \
{ \
return (s2 < s1) ? s1 : s2; \
}
......
......@@ -44,19 +44,20 @@ SourceFiles
namespace Foam
{
#define MAXMIN(retType, type1, type2) \
\
inline retType max(const type1 s1, const type2 s2) \
{ \
return (s1 > s2)? s1: s2; \
} \
\
inline retType min(const type1 s1, const type2 s2) \
{ \
return (s1 < s2)? s1: s2; \
#define MAXMIN(retType, type1, type2) \
\
/** \brief Floating/integral min. Use stdFoam::min() to preserve references */ \
inline retType min(const type1 s1, const type2 s2) \
{ \
return (s1 < s2) ? s1 : s2; \
} \
\
/** \brief Floating/integral max. Use stdFoam::max() to preserve references */ \
inline retType max(const type1 s1, const type2 s2) \
{ \
return (s2 < s1) ? s1 : s2; \
}
MAXMIN(uint8_t, uint8_t, uint8_t)
MAXMIN(uint16_t, uint16_t, uint16_t)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment