@stringsync/vexml
Version:
MusicXML to Vexflow
21 lines (20 loc) • 535 B
JavaScript
import * as util from '../util';
import { Duration } from './duration';
export class DurationRange {
numberRange;
constructor(start, end) {
this.numberRange = new util.NumberRange(start.ms, end.ms);
}
get start() {
return Duration.ms(this.numberRange.start);
}
get end() {
return Duration.ms(this.numberRange.end);
}
getSize() {
return Duration.ms(this.numberRange.getSize());
}
includes(duration) {
return this.numberRange.includes(duration.ms);
}
}