Use pi casted to appropriate type instead of implicit conversion to double in math/math.hpp
This commit is contained in:
parent
85451a1d6f
commit
4c16594b3f
1 changed files with 2 additions and 2 deletions
|
|
@ -35,13 +35,13 @@ namespace psemek::math
|
|||
template <typename T>
|
||||
T deg(T x)
|
||||
{
|
||||
return static_cast<T>((180 * x) / pi);
|
||||
return static_cast<T>((180 * x) / static_cast<T>(pi));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T rad(T x)
|
||||
{
|
||||
return static_cast<T>((x * pi) / 180);
|
||||
return static_cast<T>((x * static_cast<T>(pi)) / 180);
|
||||
}
|
||||
|
||||
template <typename X, typename T>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue