From b2d58ce0bdcb14b365379613022137e1eca86d74 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 1 May 2022 17:06:26 +0100 Subject: [PATCH] Use this.duration for things --- packages/core/timespan.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/timespan.mjs b/packages/core/timespan.mjs index 6647b615..6cc69bdf 100644 --- a/packages/core/timespan.mjs +++ b/packages/core/timespan.mjs @@ -43,7 +43,7 @@ export class TimeSpan { // (Note that the output timespan probably does not start *at* Time 0 -- // that only happens when the input Arc starts at an integral Time.) const b = this.begin.cyclePos(); - const e = b.add(this.end.sub(this.begin)); + const e = b.add(this.duration); return new TimeSpan(b, e); } @@ -97,7 +97,7 @@ export class TimeSpan { } midpoint() { - return this.begin.add(this.end.sub(this.begin).div(Fraction(2))); + return this.begin.add(this.duration.div(Fraction(2))); } equals(other) {