1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Correct divisor.

This commit is contained in:
Thomas Harte 2021-06-27 17:39:13 -04:00
parent 95c906f03d
commit b698056f78

View File

@ -219,8 +219,8 @@ template <class T, class LocalTimeScale = HalfCycles, int multiplier = 1, int di
// Figure out the number of whole input steps that is required to get
// past target, and subtract the number of whole input steps necessary
// to get to base.
const auto steps_to_base = base.as_integral() / divider;
const auto steps_to_target = (target.as_integral() + divider - 1) / divider;
const auto steps_to_base = base.as_integral() / multiplier;
const auto steps_to_target = (target.as_integral() + divider - 1) / multiplier;
return LocalTimeScale(steps_to_target - steps_to_base);
}