Split engine to packages NazaraUtils and NZSL (#375)

* Move code to NazaraUtils and NZSL packages

* Reorder includes

* Tests: Remove glslang and spirv-tools deps

* Tests: Remove glslang init

* Remove NazaraUtils tests and fix Vector4Test

* Fix Linux compilation

* Update msys2-build.yml

* Fix assimp package

* Update xmake.lua

* Update xmake.lua

* Fix shader compilation on MinGW

* Final fixes

* The final fix 2: the fix strikes back!

* Disable cache on CI

* The return of the fix™️
This commit is contained in:
Jérôme Leclercq
2022-05-25 19:36:10 +02:00
committed by GitHub
parent 3f8f1c4653
commit 03e2801dbe
483 changed files with 1139 additions and 59112 deletions

View File

@@ -9,27 +9,17 @@
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Math/Enums.hpp>
#include <Nazara/Utils/Algorithm.hpp>
#include <cmath>
#include <limits>
#include <string>
namespace Nz
{
template<typename T> constexpr T HalfPi = T(1.5707963267948966192313216916398);
template<typename T> constexpr T Pi = T(3.1415926535897932384626433832795);
template<typename T> constexpr T Sqrt2 = T(1.4142135623730950488016887242097);
template<typename T> constexpr T Sqrt3 = T(1.7320508075688772935274463415059);
template<typename T> constexpr T Sqrt5 = T(2.2360679774997896964091736687313);
template<AngleUnit Unit, typename T> class Angle;
template<typename T> constexpr T Approach(T value, T objective, T increment);
template<typename T> constexpr T Clamp(T value, T min, T max);
template<typename T, AngleUnit Unit> constexpr Angle<Unit, T> Clamp(Angle<Unit, T> value, T min, T max);
template<typename T> T ClearBit(T number, T bit);
template<typename T> constexpr std::size_t CountBits(T value);
template<typename T> constexpr T DegreeToRadian(T degrees);
template<typename T> constexpr T GetNearestPowerOfTwo(T number);
constexpr unsigned int GetNumberLength(signed char number);
constexpr unsigned int GetNumberLength(unsigned char number);
unsigned int GetNumberLength(int number);
@@ -39,19 +29,8 @@ namespace Nz
unsigned int GetNumberLength(float number, UInt8 precision = NAZARA_CORE_DECIMAL_DIGITS);
unsigned int GetNumberLength(double number, UInt8 precision = NAZARA_CORE_DECIMAL_DIGITS);
unsigned int GetNumberLength(long double number, UInt8 precision = NAZARA_CORE_DECIMAL_DIGITS);
template<typename T> constexpr unsigned int IntegralLog2(T number);
template<typename T> constexpr unsigned int IntegralLog2Pot(T pot);
template<typename T> constexpr T IntegralPow(T base, unsigned int exponent);
template<typename T, typename T2> constexpr T Lerp(const T& from, const T& to, const T2& interpolation);
template<typename T> constexpr T MultiplyAdd(T x, T y, T z);
template<typename T> constexpr bool NumberEquals(T a, T b);
template<typename T> constexpr bool NumberEquals(T a, T b, T maxDifference);
inline std::string NumberToString(long long number, UInt8 radix = 10);
template<typename T> constexpr T RadianToDegree(T radians);
template<typename T> T SetBit(T number, T bit);
inline long long StringToNumber(const std::string_view& str, UInt8 radix = 10, bool* ok = nullptr);
template<typename T> bool TestBit(T number, T bit);
template<typename T> T ToggleBit(T number, T bit);
}
#include <Nazara/Math/Algorithm.inl>