Revert "Correct references to isnan to glm::isnan for compat with Ubuntu 16.04/GCC 5.3"

Moving this to a branch.

This reverts commit b88fc62b97.
This commit is contained in:
Joe Large [Omega Heron] 2016-04-16 18:24:50 -04:00
parent b88fc62b97
commit be208ba682
3 changed files with 5 additions and 5 deletions

View file

@ -388,7 +388,7 @@ void SwingTwistConstraint::dynamicallyAdjustLimits(const glm::quat& rotation) {
glm::vec3 swungY = swingRotation * Vectors::UNIT_Y;
glm::vec3 swingAxis = glm::cross(Vectors::UNIT_Y, swungY);
float theta = atan2f(-swingAxis.z, swingAxis.x);
if (glm::isnan(theta)) {
if (isnan(theta)) {
// atan2f() will only return NaN if either of its arguments is NaN, which can only
// happen if we've been given a bad rotation. Since a NaN value here could potentially
// cause a crash (we use the value of theta to compute indices into a std::vector)

View file

@ -34,7 +34,7 @@ float PIDController::update(float measuredValue, float dt, bool resetAccumulator
if (getIsLogging()) { // if logging/reporting
updateHistory(measuredValue, dt, error, accumulatedError, changeInError, p, i, d, computedValue);
}
Q_ASSERT(!glm::isnan(computedValue));
Q_ASSERT(!isnan(computedValue));
// update state for next time
_lastError = error;

View file

@ -18,7 +18,7 @@ void Settings::getFloatValueIfValid(const QString& name, float& floatValue) {
const QVariant badDefaultValue = NAN;
bool ok = true;
float tempFloat = value(name, badDefaultValue).toFloat(&ok);
if (ok && !glm::isnan(tempFloat)) {
if (ok && !isnan(tempFloat)) {
floatValue = tempFloat;
}
}
@ -47,7 +47,7 @@ void Settings::getVec3ValueIfValid(const QString& name, glm::vec3& vecValue) {
float x = value(QString("x"), badDefaultValue).toFloat(&ok);
float y = value(QString("y"), badDefaultValue).toFloat(&ok);
float z = value(QString("z"), badDefaultValue).toFloat(&ok);
if (ok && (!glm::isnan(x) && !glm::isnan(y) && !glm::isnan(z))) {
if (ok && (!isnan(x) && !isnan(y) && !isnan(z))) {
vecValue = glm::vec3(x, y, z);
}
}
@ -74,7 +74,7 @@ void Settings::getQuatValueIfValid(const QString& name, glm::quat& quatValue) {
float y = value(QString("y"), badDefaultValue).toFloat(&ok);
float z = value(QString("z"), badDefaultValue).toFloat(&ok);
float w = value(QString("w"), badDefaultValue).toFloat(&ok);
if (ok && (!glm::isnan(x) && !glm::isnan(y) && !glm::isnan(z) && !glm::isnan(w))) {
if (ok && (!isnan(x) && !isnan(y) && !isnan(z) && !isnan(w))) {
quatValue = glm::quat(w, x, y, z);
}
}