From d65de99052d5ff08c7c4290a1f1b8e396105b8af Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 17 Apr 2025 18:44:09 +0200 Subject: Use standard library functions for llisnan and replace obvious NaN checks that don't work using /fp:fast floating point behavior under MSVC --- indra/llappearance/llpolymorph.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llappearance') diff --git a/indra/llappearance/llpolymorph.cpp b/indra/llappearance/llpolymorph.cpp index 8df8a9726f..5ee6649164 100644 --- a/indra/llappearance/llpolymorph.cpp +++ b/indra/llappearance/llpolymorph.cpp @@ -550,12 +550,12 @@ void LLPolyMorphTarget::apply( ESex avatar_sex ) mLastSex = avatar_sex; - // Check for NaN condition (NaN is detected if a variable doesn't equal itself. - if (mCurWeight != mCurWeight) + // Check for NaN condition + if (llisnan(mCurWeight)) { - mCurWeight = 0.0; + mCurWeight = 0.f; } - if (mLastWeight != mLastWeight) + if (llisnan(mLastWeight)) { mLastWeight = mCurWeight+.001f; } -- cgit v1.2.3