Fix warning N4

Fix warning N4

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-08-27 21:52:41 +02:00
parent ebda5529b2
commit f7dbabf7fe

View File

@ -23,10 +23,6 @@
*/
template <typename T, char iterations = 2>
inline T Fast_InvSqrt(T x) {
static_assert(std::is_floating_point<T>::value,
"T must be floating point type");
static_assert(iterations == 1 or iterations == 2,
"itarations must equal 1 or 2");
using Tint = typename std::conditional<sizeof(T) == 8, std::int64_t,
std::int32_t>::type;
T y = x;
@ -55,8 +51,6 @@ inline T Fast_InvSqrt(T x) {
*/
template <typename T>
T Standard_InvSqrt(T number) {
static_assert(std::is_floating_point<T>::value,
"T must be floating point type");
T squareRoot = sqrt(number);
return 1.0f / squareRoot;
}