chunk-SRMDO2KR.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // node_modules/@arcgis/core/views/2d/engine/webgl/Geometry.js
  2. var t = class {
  3. constructor(t2, s2) {
  4. this.x = t2, this.y = s2;
  5. }
  6. clone() {
  7. return new t(this.x, this.y);
  8. }
  9. equals(t2, s2) {
  10. return t2 === this.x && s2 === this.y;
  11. }
  12. isEqual(t2) {
  13. return t2.x === this.x && t2.y === this.y;
  14. }
  15. setCoords(t2, s2) {
  16. this.x = t2, this.y = s2;
  17. }
  18. normalize() {
  19. const t2 = this.x, s2 = this.y, i = Math.sqrt(t2 * t2 + s2 * s2);
  20. this.x /= i, this.y /= i;
  21. }
  22. rightPerpendicular() {
  23. const t2 = this.x;
  24. this.x = this.y, this.y = -t2;
  25. }
  26. move(t2, s2) {
  27. this.x += t2, this.y += s2;
  28. }
  29. assign(t2) {
  30. this.x = t2.x, this.y = t2.y;
  31. }
  32. assignAdd(t2, s2) {
  33. this.x = t2.x + s2.x, this.y = t2.y + s2.y;
  34. }
  35. assignSub(t2, s2) {
  36. this.x = t2.x - s2.x, this.y = t2.y - s2.y;
  37. }
  38. rotate(t2, s2) {
  39. const i = this.x, n = this.y;
  40. this.x = i * t2 - n * s2, this.y = i * s2 + n * t2;
  41. }
  42. scale(t2) {
  43. this.x *= t2, this.y *= t2;
  44. }
  45. length() {
  46. const t2 = this.x, s2 = this.y;
  47. return Math.sqrt(t2 * t2 + s2 * s2);
  48. }
  49. static distance(t2, s2) {
  50. const i = s2.x - t2.x, n = s2.y - t2.y;
  51. return Math.sqrt(i * i + n * n);
  52. }
  53. static add(s2, i) {
  54. return new t(s2.x + i.x, s2.y + i.y);
  55. }
  56. static sub(s2, i) {
  57. return new t(s2.x - i.x, s2.y - i.y);
  58. }
  59. };
  60. var s;
  61. !function(t2) {
  62. t2[t2.Unknown = 0] = "Unknown", t2[t2.Point = 1] = "Point", t2[t2.LineString = 2] = "LineString", t2[t2.Polygon = 3] = "Polygon";
  63. }(s || (s = {}));
  64. export {
  65. t,
  66. s
  67. };
  68. //# sourceMappingURL=chunk-SRMDO2KR.js.map