UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

35 lines (34 loc) 747 B
/** * A point in 2D space. * @internal */ export default class Point { x: number; y: number; constructor(x: number, y: number); add(other: Point): Point; subtract(other: Point): Point; multiply(factor: number): Point; divide(factor: number): Point; normalize(): Point; static vectorWidth(vector: { start: Point; end: Point; }): number; static vectorHeight(vector: { start: Point; end: Point; }): number; static vectorLength(vector: { start: Point; end: Point; }): number; distanceFrom(vector: { start: Point; end: Point; }): number; isInsideOf(vec: { start: Point; end: Point; }): boolean; }