Sine Wave Synthesizer tutorial question

Hi, I’m making my way through the tutorials and have a question…

In the last part of the tutorial (“Updating the synthesis code”) where we smooth out artifacts the frequency slider creates in our sine wave, don’t we also need to change the following line in the updateAngleDelta() function:

auto cyclesPerSample = frequencySlider.getValue() / currentSampleRate;

to this:
auto cyclesPerSample = currentFrequency / currentSampleRate;

Otherwise the angleDelta won’t change right? Or am I missing something fundamental here and this is not necessary? Just want to make sure I fully understand what’s going on, thanks!