Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
26d0d48f
Commit
26d0d48f
authored
Jan 09, 2019
by
Mark Olesen
Browse files
STYLE: doxygen comments for min/max functions
parent
907dd6d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/primitives/Scalar/doubleFloat.H
View file @
26d0d48f
...
...
@@ -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
)
...
...
src/OpenFOAM/primitives/ints/int/int.H
View file @
26d0d48f
...
...
@@ -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; \
}
...
...
src/OpenFOAM/primitives/ints/uint/uint.H
View file @
26d0d48f
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment