better #define for disabling C++ operators

This commit is contained in:
Jeffery Myers 2024-10-16 18:08:36 -07:00
parent c1c9851348
commit 6d60173834

View File

@ -26,7 +26,9 @@
* #define RAYMATH_STATIC_INLINE * #define RAYMATH_STATIC_INLINE
* Define static inline functions code, so #include header suffices for use. * Define static inline functions code, so #include header suffices for use.
* This may use up lots of memory. * This may use up lots of memory.
* *
* #define RAYMATH_DISABLE_OPERATORS
* Disables C++ operator overloads for raymath types.
* *
* LICENSE: zlib/libpng * LICENSE: zlib/libpng
* *
@ -2583,7 +2585,7 @@ RMAPI void MatrixDecompose(Matrix mat, Vector3 *translation, Quaternion *rotatio
// optional C++ math operators // optional C++ math operators
// define RAYLIB_DISABLE_VECTOR_OPERATORS to disable // define RAYLIB_DISABLE_VECTOR_OPERATORS to disable
#if defined(__cplusplus) && !defined(RAYLIB_DISABLE_VECTOR_OPERATORS) #if defined(__cplusplus) && !defined(RAYMATH_DISABLE_OPERATORS)
//------------------Vector2-----------------// //------------------Vector2-----------------//
static constexpr Vector2 Vector2Zeros = { 0, 0 }; static constexpr Vector2 Vector2Zeros = { 0, 0 };