mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed fmin/fmax CRT library name collision.
This commit is contained in:
parent
82194c57ee
commit
a4df646179
2 changed files with 6 additions and 4 deletions
|
@ -1822,7 +1822,7 @@ void createNearClipVolume(float* __restrict _outPlanes24f
|
||||||
bool clipTest(const float* _planes, uint8_t _planeNum, const Mesh& _mesh, const float* _scale, const float* _translate)
|
bool clipTest(const float* _planes, uint8_t _planeNum, const Mesh& _mesh, const float* _scale, const float* _translate)
|
||||||
{
|
{
|
||||||
float (*volumePlanes)[4] = (float(*)[4])_planes;
|
float (*volumePlanes)[4] = (float(*)[4])_planes;
|
||||||
float scale = fmax(fmax(_scale[0], _scale[1]), _scale[2]);
|
float scale = fmaxf(fmaxf(_scale[0], _scale[1]), _scale[2]);
|
||||||
|
|
||||||
const GroupArray& groups = _mesh.m_groups;
|
const GroupArray& groups = _mesh.m_groups;
|
||||||
for (GroupArray::const_iterator it = groups.begin(), itEnd = groups.end(); it != itEnd; ++it)
|
for (GroupArray::const_iterator it = groups.begin(), itEnd = groups.end(); it != itEnd; ++it)
|
||||||
|
|
|
@ -12,19 +12,21 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
inline float fmin(float _a, float _b)
|
#if BX_COMPILER_MSVC
|
||||||
|
inline float fminf(float _a, float _b)
|
||||||
{
|
{
|
||||||
return _a < _b ? _a : _b;
|
return _a < _b ? _a : _b;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float fmax(float _a, float _b)
|
inline float fmaxf(float _a, float _b)
|
||||||
{
|
{
|
||||||
return _a > _b ? _a : _b;
|
return _a > _b ? _a : _b;
|
||||||
}
|
}
|
||||||
|
#endif // BX_COMPILER_MSVC
|
||||||
|
|
||||||
inline float fclamp(float _a, float _min, float _max)
|
inline float fclamp(float _a, float _min, float _max)
|
||||||
{
|
{
|
||||||
return fmin(fmax(_a, _min), _max);
|
return fminf(fmaxf(_a, _min), _max);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float fsaturate(float _a)
|
inline float fsaturate(float _a)
|
||||||
|
|
Loading…
Reference in a new issue