Point.d.ts 395 B

123456789101112131415161718
  1. export interface IPoint {
  2. x: number;
  3. y: number;
  4. }
  5. export declare class Point implements IPoint {
  6. private _x;
  7. private _y;
  8. constructor(x: number, y: number);
  9. get x(): number;
  10. get y(): number;
  11. add(pt: IPoint): Point;
  12. sub(pt: IPoint): Point;
  13. mul(pt: IPoint): Point;
  14. div(pt: IPoint): Point;
  15. abs(): Point;
  16. magnitude(): number;
  17. floor(): Point;
  18. }