maths: add identity function
This commit is contained in:
parent
60f16cdc4a
commit
36b4043faf
@ -139,6 +139,15 @@ constexpr float sign (float);
|
|||||||
constexpr double sign (double);
|
constexpr double sign (double);
|
||||||
|
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
template <typename T>
|
||||||
|
const T&
|
||||||
|
identity (const T& t)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Comparisons
|
// Comparisons
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
Loading…
Reference in New Issue
Block a user