switch to cmath and std::isnan
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "ChaperoneTabController.h"
|
||||
#include <QQuickWindow>
|
||||
#include "../overlaycontroller.h"
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
@@ -361,7 +361,7 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseHmd.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseHmd.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceHmd)) {
|
||||
if (!std::isnan(distanceHmd)) {
|
||||
minDistance = distanceHmd;
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,7 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseLeft.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseLeft.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceLeft) && (isnan(minDistance) || distanceLeft < minDistance)) {
|
||||
if (!std::isnan(distanceLeft) && (std::isnan(minDistance) || distanceLeft < minDistance)) {
|
||||
minDistance = distanceLeft;
|
||||
}
|
||||
}
|
||||
@@ -388,12 +388,12 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseRight.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseRight.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceRight) && (isnan(minDistance) || distanceRight < minDistance)) {
|
||||
if (!std::isnan(distanceRight) && (std::isnan(minDistance) || distanceRight < minDistance)) {
|
||||
minDistance = distanceRight;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isnan(minDistance)) {
|
||||
if (!std::isnan(minDistance)) {
|
||||
handleChaperoneWarnings(minDistance);
|
||||
}
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ float ChaperoneTabController::getBoundsMaxY() {
|
||||
} else {
|
||||
ci = 2;
|
||||
}
|
||||
if (isnan(result) || result < collisionBounds[b].vCorners[ci].v[1]) {
|
||||
if (std::isnan(result) || result < collisionBounds[b].vCorners[ci].v[1]) {
|
||||
result = collisionBounds[b].vCorners[ci].v[1];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user