import type { Vec2 } from "./geometry.js"; /** Sum of two 2D vectors. * @internal */ export declare function add(a: Vec2, b: Vec2): Vec2; /** Difference `a - b` of two 2D vectors. * @internal */ export declare function sub(a: Vec2, b: Vec2): Vec2; /** Scale a 2D vector by a scalar. * @internal */ export declare function scale(a: Vec2, s: number): Vec2; /** Negate a 2D vector. * @internal */ export declare function negate(a: Vec2): Vec2; /** Dot product of two 2D vectors. * @internal */ export declare function dot(a: Vec2, b: Vec2): number; /** 2D cross product (scalar z of the 3D cross), positive when `b` is counter-clockwise from `a`. * @internal */ export declare function cross(a: Vec2, b: Vec2): number; /** Euclidean length of a 2D vector. * @internal */ export declare function length(a: Vec2): number; /** Squared length of a 2D vector; cheaper than `length` when only comparing magnitudes. * @internal */ export declare function lengthSquared(a: Vec2): number; /** Unit vector in the direction of `a`; returns the zero vector when `a` has no length. * @internal */ export declare function normalize(a: Vec2): Vec2; /** Distance between two points. * @internal */ export declare function distance(a: Vec2, b: Vec2): number; /** Squared distance between two points; cheaper than `distance` for radius comparisons. * @internal */ export declare function distanceSquared(a: Vec2, b: Vec2): number; /** Linearly interpolate between points `a` and `b` by fraction `t`. * @internal */ export declare function lerp(a: Vec2, b: Vec2, t: number): Vec2; /** Left-hand perpendicular of `a` (rotated 90° counter-clockwise). * @internal */ export declare function perp(a: Vec2): Vec2; /** Rotate a 2D vector by `radians` about the origin. * @internal */ export declare function rotate(a: Vec2, radians: number): Vec2; /** * Reflect a velocity off a surface with unit `normal`, losing energy by `restitution` (0..1). At * `restitution` 1 the normal component mirrors elastically (`v − 2(v·n)n`); at 0 it is removed so the * vector slides along the surface. Only the normal component is scaled — tangential motion is kept — so * this is the wall/paddle/boundary bounce every arcade ball game hand-rolls. * @internal */ export declare function reflect(v: Vec2, normal: Vec2, restitution?: number): Vec2; /** Unit vector for a heading measured clockwise from +Y (the engine's XZ-plane convention). * @internal */ export declare function fromHeading(headingRad: number): Vec2; /** Heading in radians of a vector, measured clockwise from +Y to match `fromHeading`. * @internal */ export declare function heading(a: Vec2): number; /** Wrap an angle in radians into `[0, 2π)`. * @internal */ export declare function normalizeAngle(angleRad: number): number; /** Wrap an angle in degrees into `[0, 360)`. * @internal */ export declare function normalizeAngleDeg(angleDeg: number): number;