# LinearSmoothedValue - weirdness or misunderstanding?

**URL:** <https://forum.juce.com/t/linearsmoothedvalue-weirdness-or-misunderstanding/30941>\
**Category:** General JUCE discussion\
**Created:** [December 19, 2018, 1:50pm UTC](https://forum.juce.com/t/linearsmoothedvalue-weirdness-or-misunderstanding/30941 "2018-12-19T13:50:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![garrilla](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/garrilla/32/103_2.png) [@garrilla](https://forum.juce.com/u/garrilla)\
**Post date:** [December 19, 2018, 1:50pm UTC](https://forum.juce.com/t/linearsmoothedvalue-weirdness-or-misunderstanding/30941/1 "2018-12-19T13:50:52Z")

</div>

I have a 8 LSVs smoothing out a punch of paramaters… two of them behave weirdly.

If I step into the SetValue() method, the `countdown` isn’t consinsistent

```
    void setValue (FloatType newValue, bool force = false) noexcept
{
    if (force)
    {
        target = currentValue = newValue;
        countdown = 0;
        return;
    }

    if (target != newValue)
    {
        target = newValue;
        countdown = stepsToTarget; // stepsToTarget is always right, but countdown, after assignment, is sometimes right, sometime
        // and then...

        if (countdown <= 0)
            currentValue = target;
        else
            step = (target - currentValue) / (FloatType) countdown; // countdown is always wrong here
    }
}

```

In my current example that I’ve stepped into, stepsToTarget = 684, countdown = 642 ?

I’m I mis-understanding something here?
