mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: move bit cell code to SharedCommon
This commit is contained in:
parent
abc8b0db1e
commit
8c4bcc13d7
@ -20,7 +20,9 @@
|
||||
#define RECASTDETOURCOMMON_H
|
||||
|
||||
#include "Shared/Include/SharedMath.h"
|
||||
#include <stddef.h>
|
||||
|
||||
/// The total number of bits in an bit cell integer.
|
||||
static const int RD_BITS_PER_BIT_CELL = 32;
|
||||
|
||||
/**
|
||||
@defgroup shared Shared
|
||||
@ -40,6 +42,11 @@ feature to find minor members.
|
||||
/// @param [in] _ Unused parameter
|
||||
template<class T> void rdIgnoreUnused(const T&) { }
|
||||
|
||||
/// Tests a specific bit in a bit cell
|
||||
/// @param[in] i The bit number
|
||||
/// @return The offset mask for the bit.
|
||||
inline int rdBitCellBit(const int i) { return (1 << ((i) & (RD_BITS_PER_BIT_CELL-1))); }
|
||||
|
||||
/// Swaps the values of the two parameters.
|
||||
/// @param[in,out] a Value A
|
||||
/// @param[in,out] b Value B
|
||||
|
@ -12,12 +12,6 @@ Members in this module are wrappers around the standard math library
|
||||
/// The value of PI used by Recast & Detour.
|
||||
static const float RD_PI = 3.14159265f;
|
||||
|
||||
/// The total number of bits in an bit cell integer.
|
||||
static const int RD_BITS_PER_BIT_CELL = 32;
|
||||
|
||||
// TODO: move to common!
|
||||
inline int rdBitCellBit(const int bitNum) { return (1 << ((bitNum) & (RD_BITS_PER_BIT_CELL-1))); }
|
||||
|
||||
inline float rdMathFabsf(float x) { return fabsf(x); }
|
||||
inline float rdMathSqrtf(float x) { return sqrtf(x); }
|
||||
inline float rdMathFloorf(float x) { return floorf(x); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user