mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Fix warning N4
Fix warning N4 Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
ebda5529b2
commit
f7dbabf7fe
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user