PointF2D.js 683 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. var PointF2D = (function () {
  3. function PointF2D(x, y) {
  4. if (x === void 0) { x = 0; }
  5. if (y === void 0) { y = 0; }
  6. this.x = 0;
  7. this.y = 0;
  8. this.x = x;
  9. this.y = y;
  10. }
  11. Object.defineProperty(PointF2D, "Empty", {
  12. get: function () {
  13. return new PointF2D();
  14. },
  15. enumerable: true,
  16. configurable: true
  17. });
  18. PointF2D.pointsAreEqual = function (p1, p2) {
  19. return (p1.x === p2.x && p1.y === p2.y);
  20. };
  21. PointF2D.prototype.ToString = function () {
  22. return "[" + this.x + ", " + this.y + "]";
  23. };
  24. return PointF2D;
  25. }());
  26. exports.PointF2D = PointF2D;