Allow linger to accept non-fractions

This commit is contained in:
alex 2022-04-13 15:59:36 +01:00
parent dcc5f66691
commit ec3371c4ff
2 changed files with 11 additions and 1 deletions

View file

@ -706,6 +706,8 @@ class Pattern {
}
_zoom(s, e) {
e = Fraction(e)
s = Fraction(s)
const d = e.sub(s);
return this.withQuerySpan((span) => span.withCycle((t) => t.mul(d).add(s)))
.withEventSpan((span) => span.withCycle((t) => t.sub(s).div(d)))