maths: add rsqrt convenience function
This commit is contained in:
parent
76c809f031
commit
1678cb3a69
@ -214,6 +214,15 @@ namespace util {
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// exponentials
|
// exponentials
|
||||||
|
|
||||||
|
// reciprocal sqrt, provided so that we can search for usages and replace
|
||||||
|
// at a later point with a more efficient implementation.
|
||||||
|
inline float
|
||||||
|
rsqrt (float val)
|
||||||
|
{
|
||||||
|
return 1 / std::sqrt (val);
|
||||||
|
}
|
||||||
|
|
||||||
template <
|
template <
|
||||||
typename BaseT,
|
typename BaseT,
|
||||||
typename ExponentT,
|
typename ExponentT,
|
||||||
|
Loading…
Reference in New Issue
Block a user