Browse Source

rm segments expansion (#7)

master
rozetko 6 years ago committed by GitHub
parent
commit
9014ec9c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/model/segment.ts

5
src/model/segment.ts

@ -23,9 +23,6 @@ export class Segment {
}
expandDist(allDist: number, portion: number): Segment {
if(allDist * portion < this.length) {
return new Segment(this._key, this.from, this.to);
}
var p = Math.round(this.middle - allDist * portion / 2);
var q = Math.round(this.middle + allDist * portion / 2);
p = Math.min(p, this.from);
@ -36,4 +33,4 @@ export class Segment {
equals(segment: Segment) {
return this._key === segment._key;
}
}
}

Loading…
Cancel
Save