From 91221a9b4abf43c79223b053372a2845e761f6c3 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sat, 23 Dec 2023 14:01:04 +0100 Subject: [PATCH] Minor changes --- include/Nazara/Graphics/ShaderReflection.hpp | 2 +- include/Nazara/Math/Angle.inl | 45 +++++++++++++------- include/Nazara/Platform/Keyboard.hpp | 4 +- src/Nazara/Platform/SDL2/InputImpl.cpp | 4 +- 4 files changed, 35 insertions(+), 20 deletions(-) diff --git a/include/Nazara/Graphics/ShaderReflection.hpp b/include/Nazara/Graphics/ShaderReflection.hpp index ccbb4b14c..6cfe8fda5 100644 --- a/include/Nazara/Graphics/ShaderReflection.hpp +++ b/include/Nazara/Graphics/ShaderReflection.hpp @@ -11,8 +11,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/include/Nazara/Math/Angle.inl b/include/Nazara/Math/Angle.inl index d7ec7cb94..2ad2e624c 100644 --- a/include/Nazara/Math/Angle.inl +++ b/include/Nazara/Math/Angle.inl @@ -22,7 +22,8 @@ namespace Nz template struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return angle; } @@ -31,7 +32,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return DegreeToRadian(angle); } @@ -40,7 +42,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return angle / T(360); } @@ -49,7 +52,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return RadianToDegree(angle); } @@ -58,7 +62,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return angle / (T(2) * Pi); } @@ -67,7 +72,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return angle * T(360); } @@ -76,7 +82,8 @@ namespace Nz template<> struct AngleConversion { - template static constexpr T Convert(T angle) + template + static constexpr T Convert(T angle) { return angle * T(2) * Pi; } @@ -87,12 +94,14 @@ namespace Nz template<> struct AngleUtils { - template static constexpr T GetEpsilon() + template + static constexpr T GetEpsilon() { return T(1e-4); } - template static constexpr T GetLimit() + template + static constexpr T GetLimit() { return 360; } @@ -106,17 +115,20 @@ namespace Nz template<> struct AngleUtils { - template static constexpr T GetEpsilon() + template + static constexpr T GetEpsilon() { return T(1e-5); } - template static constexpr T GetLimit() + template + static constexpr T GetLimit() { return T(2) * Pi; } - template static std::ostream& ToString(std::ostream& out, T value) + template + static std::ostream& ToString(std::ostream& out, T value) { return out << "Angle(" << value << "rad)"; } @@ -125,17 +137,20 @@ namespace Nz template<> struct AngleUtils { - template static constexpr T GetEpsilon() + template + static constexpr T GetEpsilon() { return T(1e-5); } - template static constexpr T GetLimit() + template + static constexpr T GetLimit() { return 1; } - template static std::ostream& ToString(std::ostream& out, T value) + template + static std::ostream& ToString(std::ostream& out, T value) { return out << "Angle(" << value << "turn)"; } diff --git a/include/Nazara/Platform/Keyboard.hpp b/include/Nazara/Platform/Keyboard.hpp index a0eae9c92..3dcb8cbab 100644 --- a/include/Nazara/Platform/Keyboard.hpp +++ b/include/Nazara/Platform/Keyboard.hpp @@ -22,7 +22,7 @@ namespace Nz { Undefined = -1, - // Lettres + // Letters A, B, C, @@ -171,7 +171,7 @@ namespace Nz { Undefined = -1, - // Lettres + // Letters A, B, C, diff --git a/src/Nazara/Platform/SDL2/InputImpl.cpp b/src/Nazara/Platform/SDL2/InputImpl.cpp index 7ab3a4b82..57e92c132 100644 --- a/src/Nazara/Platform/SDL2/InputImpl.cpp +++ b/src/Nazara/Platform/SDL2/InputImpl.cpp @@ -43,7 +43,7 @@ namespace Nz if (scancode != SDL_SCANCODE_UNKNOWN) name = SDL_GetScancodeName(scancode); else - name = "Unknown"; + name = "unknown"; return name; } @@ -56,7 +56,7 @@ namespace Nz if (vkey != SDLK_UNKNOWN) name = SDL_GetKeyName(vkey); else - name = "Unknown"; + name = "unknown"; return name; }