build
This commit is contained in:
parent
aec5b3bb2b
commit
3c56f24eed
7 changed files with 681 additions and 2169 deletions
|
|
@ -23,42 +23,6 @@ export function curry(func, overload) {
|
|||
}
|
||||
return fn;
|
||||
}
|
||||
Fraction.prototype.sam = function() {
|
||||
return this.floor();
|
||||
};
|
||||
Fraction.prototype.nextSam = function() {
|
||||
return this.sam().add(1);
|
||||
};
|
||||
Fraction.prototype.wholeCycle = function() {
|
||||
return new TimeSpan(this.sam(), this.nextSam());
|
||||
};
|
||||
Fraction.prototype.lt = function(other) {
|
||||
return this.compare(other) < 0;
|
||||
};
|
||||
Fraction.prototype.gt = function(other) {
|
||||
return this.compare(other) > 0;
|
||||
};
|
||||
Fraction.prototype.lte = function(other) {
|
||||
return this.compare(other) <= 0;
|
||||
};
|
||||
Fraction.prototype.gte = function(other) {
|
||||
return this.compare(other) >= 0;
|
||||
};
|
||||
Fraction.prototype.eq = function(other) {
|
||||
return this.compare(other) == 0;
|
||||
};
|
||||
Fraction.prototype.max = function(other) {
|
||||
return this.gt(other) ? this : other;
|
||||
};
|
||||
Fraction.prototype.min = function(other) {
|
||||
return this.lt(other) ? this : other;
|
||||
};
|
||||
Fraction.prototype.show = function() {
|
||||
return this.s * this.n + "/" + this.d;
|
||||
};
|
||||
Fraction.prototype.or = function(other) {
|
||||
return this.eq(0) ? other : this;
|
||||
};
|
||||
class TimeSpan {
|
||||
constructor(begin, end) {
|
||||
this.begin = Fraction(begin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue