From 8b3d61ff5db4976ca6e74981ace727909f326f9c Mon Sep 17 00:00:00 2001 From: scorpioblood <77296181+scorpioblood@users.noreply.github.com> Date: Fri, 24 May 2024 23:45:30 +0200 Subject: [PATCH] Math lib independence. --- .../Runtime/Core/public/Math/MathTypes.h | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Engine/Source/Runtime/Core/public/Math/MathTypes.h diff --git a/Engine/Source/Runtime/Core/public/Math/MathTypes.h b/Engine/Source/Runtime/Core/public/Math/MathTypes.h new file mode 100644 index 0000000..4d99a07 --- /dev/null +++ b/Engine/Source/Runtime/Core/public/Math/MathTypes.h @@ -0,0 +1,112 @@ +#pragma once + +#ifdef P_BUILD_LIB +# include "PhanesEnginePCH.h" +#else +# define NOMINMAX +# include +# include +#endif + +// ============================================= // +// Turn os specific types into global types. // +// ============================================= // + + +// TODO: include int128 + +namespace Phanes::Core::Types +{ + +#ifdef P_WIN_BUILD + + // MSVC specific types + + typedef _FLOAT128 float128; + +#endif + + + // Specific types size + // + // 8-Bit integer + typedef int8_t int8; + + // 16-Bit integer + typedef int16_t int16; + + // 32-Bit integer + typedef int32_t int32; + + // 64-Bit integer + typedef int64_t int64; + + // 8-Bit unsigned integer + typedef uint8_t uint8; + + // 16-Bit unsigned integer + typedef uint16_t uint16; + + // 32-Bit unsigned integer + typedef uint32_t uint32; + + // 64-Bit unsigned integer + typedef uint64_t uint64; + + + + // At least N bit types + // + // At least 8-Bit integer + typedef int_least8_t lint8; + + // At least 16-Bit integer + typedef int_least16_t lint16; + + // At least 32-Bit integer + typedef int_least32_t lint32; + + // At least 64-Bit integer + typedef int_least64_t lint64; + + // At least 8-Bit integer + typedef uint_least8_t ulint8; + + // At least 16-Bit integer + typedef uint_least16_t ulint16; + + // At least 32-Bit integer + typedef uint_least32_t ulint32; + + // At least 64-Bit integer + typedef uint_least64_t ulint64; + + + + // Fast N bit types + // + // Fast 8-bit integer + typedef int_fast8_t fint8; + + // At least 16-Bit integer + typedef int_fast16_t fint16; + + // At least 32-Bit integer + typedef int_fast32_t fint32; + + // At least 64-Bit integer + typedef int_fast64_t fint64; + + // At least 8-Bit integer + typedef uint_fast8_t ufint8; + + // At least 16-Bit integer + typedef uint_fast16_t ufint16; + + // At least 32-Bit integer + typedef uint_fast32_t ufint32; + + // At least 64-Bit integer + typedef uint_fast64_t ufint64; + +} \ No newline at end of file