UNPKG

@foblex/2d

Version:

An Angular library for 2D geometric computations, providing classes and utilities for manipulating points, lines, vectors, rectangles, arcs, and transformations.

15 lines (14 loc) 650 B
import { IVector } from './i-vector'; import { IPoint } from '../point'; export declare class VectorExtensions { static initialize(x?: number, y?: number): IVector; static fromPoints(p1: IPoint, p2: IPoint): IVector; static vectorLength(v: IVector): number; static magnitudeSquared(v: IVector): number; static dotProduct(v1: IVector, v2: IVector): number; static crossProduct(v1: IVector, v2: IVector): number; static subtract(v1: IVector, v2: IVector): IVector; static add(v1: IVector, v2: IVector): IVector; static scale(v: IVector, value: number): IVector; static angle(v1: IVector, v2: IVector): number; }