#pragma once #define HK_MATH_H // Note: these headers have to be included in a specific order. // clang-format off #include #include // Forward declarations class hkVector4f; class hkVector4fComparison; class hkSimdFloat32; class hkQuaternionf; class hkMatrix3f; class hkRotationf; class hkTransformf; class hkQTransformf; class hkQsTransformf; // Type aliases using hkVector4fParameter = const hkVector4f&; using hkVector4fComparisonParameter = const hkVector4fComparison&; using hkSimdFloat32Parameter = const hkSimdFloat32&; using hkQuaternionfParameter = const hkQuaternionf&; // Headers #include #include #include #include #include #include #include #include // Implementations #include #include #include #include #include // clang-format on namespace hkMath { template HK_FORCE_INLINE T1 max2(T1 x, T2 y) { return x > static_cast(y) ? x : static_cast(y); } HK_FORCE_INLINE int hkToIntFast(hkFloat32 r) { return int(r); } HK_FORCE_INLINE hkBool32 intInRange(int value, int lowInclusive, int highExclusive) { return (lowInclusive <= value) & (value < highExclusive); } } // namespace hkMath