dgeoutils 2.4.18 → 2.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,6 +125,7 @@ export declare class DPoint {
125
125
  set alt(v: number | undefined);
126
126
  simple<T extends Record<string, number>>(xKey?: string, yKey?: string, zKey?: string): T;
127
127
  setIfLessThan(p: DPoint): DPoint;
128
+ setIfMoreThan(p: DPoint): DPoint;
128
129
  minus(): DPoint;
129
130
  orthodromicPath(point: DPoint, pointsCount?: number): DPolygon;
130
131
  sortByDistance(p: DPolygon): DPolygon;
@@ -733,6 +733,11 @@ var DPoint = (function () {
733
733
  this.y = Math.max(this.y, p.y);
734
734
  return this;
735
735
  };
736
+ DPoint.prototype.setIfMoreThan = function (p) {
737
+ this.x = Math.min(this.x, p.x);
738
+ this.y = Math.min(this.y, p.y);
739
+ return this;
740
+ };
736
741
  DPoint.prototype.minus = function () {
737
742
  return this.scale(-1);
738
743
  };
@@ -610,6 +610,11 @@ export class DPoint {
610
610
  this.y = Math.max(this.y, p.y);
611
611
  return this;
612
612
  }
613
+ setIfMoreThan(p) {
614
+ this.x = Math.min(this.x, p.x);
615
+ this.y = Math.min(this.y, p.y);
616
+ return this;
617
+ }
613
618
  minus() {
614
619
  return this.scale(-1);
615
620
  }
@@ -730,6 +730,11 @@ var DPoint = (function () {
730
730
  this.y = Math.max(this.y, p.y);
731
731
  return this;
732
732
  };
733
+ DPoint.prototype.setIfMoreThan = function (p) {
734
+ this.x = Math.min(this.x, p.x);
735
+ this.y = Math.min(this.y, p.y);
736
+ return this;
737
+ };
733
738
  DPoint.prototype.minus = function () {
734
739
  return this.scale(-1);
735
740
  };