44 return !std::isnan(value) && !std::isinf(value);
54 return v1 < v2 ? T(1) : T(0);
61 return { (
Float)value };
constexpr INLINE auto less(const T &v1, const T &v2)
Compares two objects of the same time component-wise.
INLINE Float minElement(const T &value)
Returns minimum element, simply the value iself by default.
INLINE Float normSqr(const T &value)
Squared value of the norm.
NAMESPACE_SPH_BEGIN INLINE Float norm(const T &value)
Returns a norm, absolute value by default.
INLINE StaticArray< Float, 6 > getComponents(const T &value)
Returns the components of the object in array.
INLINE bool isReal(const T &value)
Checks for nans and infs.
INLINE Float maxElement(const T &value)
Returns maximum element, simply the value iself by default.
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Additional math routines (with more includes).
constexpr INLINE T sqr(const T &f) noexcept
Return a squared value.
INLINE auto abs(const T &f)
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
Array with fixed number of allocated elements.