@stefanfortuin/workout-creator
Version:
A workout creator for mrc or erg file formats
1 lines • 327 B
JavaScript
class Interval{constructor(a,b){this.duration=a,this.effort=b,this.start=0}get end(){return this.start+this.duration}format_sec(a){return(a-(a%=60))/60+(9<a?".":".0")+Math.round(1.666667*a)}toString(){return`${this.format_sec(this.start)} ${this.effort}\n${this.format_sec(this.end)} ${this.effort}\n`}}export default Interval;