diff options
author | Rider Linden <rider@lindenlab.com> | 2018-09-14 15:45:28 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-09-14 15:45:28 +0000 |
commit | 3dd286064e253097af696068940afe009acc0b2e (patch) | |
tree | 4a826c3f94f36ff849389976dd9c99d0551f8bb7 /indra/newview | |
parent | 13efe74bc1fb993df569376a6081422d73f1ab1d (diff) | |
parent | 3988bc8d85e593926c16282d8bd5094060da654b (diff) |
Merged in andreykproductengine/maint-eep (pull request #86)
SL-9653 Multy slider edge overlap cases
Approved-by: Maxim Nikolenko <maximnproductengine@lindenlab.com>
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llenvironment.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 4b60ed4e68..6981203e75 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -1818,7 +1818,14 @@ LLSettingsBase::BlendFactor LLTrackBlenderLoopingManual::setPosition(const LLSet F64 spanPos = ((mPosition < (*bounds.first).first) ? (mPosition + 1.0) : mPosition) - (*bounds.first).first; - F64 blendf = fmod(spanPos, spanLength) / spanLength; + if (spanPos > spanLength) + { + // we are clamping position to 0-1 and spanLength is 1 + // so don't account for case of spanPos == spanLength + spanPos = fmod(spanPos, spanLength); + } + + F64 blendf = spanPos / spanLength; return LLSettingsBlender::setBlendFactor(blendf); } |