UNPKG

wsp-toolkit

Version:
12 lines (11 loc) 338 B
import type { Point } from "../../type/Point"; export declare class Vector { x: number; y: number; constructor(a: Point, b?: Point); static of(a: Point, b?: Point): Vector; getLength(): number; getAngle(vector: Vector): number; getDirection(vector: Vector): 1 | 0 | -1; getScale(vector: Vector): number; }