mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Possibly fix Linux compile error
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include <hb-ft.h>
|
#include <hb-ft.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
@@ -44,7 +45,7 @@ static inline float fixed26_6ToFloat(int32 v)
|
|||||||
static int32 floatToFixed26_6(float v)
|
static int32 floatToFixed26_6(float v)
|
||||||
{
|
{
|
||||||
float integer = 0;
|
float integer = 0;
|
||||||
float frac = modf(v, &integer);
|
float frac = std::modf(v, &integer);
|
||||||
|
|
||||||
return (int32)(((uint32)integer << 6) | (uint32)(frac * 64));
|
return (int32)(((uint32)integer << 6) | (uint32)(frac * 64));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user