mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 07:16:25 +02:00
fixing compilation issue on macos
This commit is contained in:
parent
fcb293d0b2
commit
b04dbf7a34
1 changed files with 133 additions and 131 deletions
|
@ -11,6 +11,8 @@
|
||||||
#include "Stage.h"
|
#include "Stage.h"
|
||||||
|
|
||||||
#include <glm/gtx/transform.hpp>
|
#include <glm/gtx/transform.hpp>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
using namespace model;
|
using namespace model;
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,10 +76,10 @@ void EarthSunModel::updateSun() const {
|
||||||
_surfaceSunDir = glm::normalize(Vec3(lssd.x, lssd.y, lssd.z));
|
_surfaceSunDir = glm::normalize(Vec3(lssd.x, lssd.y, lssd.z));
|
||||||
}
|
}
|
||||||
|
|
||||||
float moduloRange(float val, float minVal, float maxVal) {
|
double moduloRange(double val, double minVal, double maxVal) {
|
||||||
float range = maxVal - minVal;
|
double range = maxVal - minVal;
|
||||||
float rval = (val - minVal) / range;
|
double rval = (val - minVal) / range;
|
||||||
float intval;
|
double intval;
|
||||||
return modf(rval, &intval) * range + minVal;
|
return modf(rval, &intval) * range + minVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue