SA_Maths
Sapphire Suite's C++ Maths Library
Loading...
Searching...
No Matches
Include
SA
Maths
Algorithms
Sqrt.hpp
Go to the documentation of this file.
1
// Copyright (c) 2023 Sapphire development team. All Rights Reserved.
2
3
#pragma once
4
5
#ifndef SAPPHIRE_MATHS_SQRT_GUARD
6
#define SAPPHIRE_MATHS_SQRT_GUARD
7
8
#include <cmath>
9
10
#include <
SA/Maths/Debug.hpp
>
11
22
namespace
SA
23
{
24
namespace
Maths
25
{
35
template
<
typename
T>
36
T
Sqrt
(T _in)
37
{
38
SA_ASSERT((
Default
, _in >= T(0)), SA.Maths, (L
"Compute square root of negative number: [%1]"
, _in));
39
40
return
std::sqrt(_in);
41
}
42
}
43
}
44
53
#endif
// GUARD
Debug.hpp
Maths module Debug compatibility definition.
SA::MatrixMajor::Default
@ Default
Default standard.
SA::Maths::Sqrt
T Sqrt(T _in)
Compute the square root of the input as float.
Definition
Sqrt.hpp:36
Generated by
1.10.0