/** * Calculates the squared value of the Euclidean distance between * two points (considering a point as a vector object). */ export declare function distSq(v1: p5.Vector, v2: p5.Vector): number; /** * Multiplies the given matrix and array. * The number of matrix columns and the array length must be identical. * @param {number[][]} matrix - Any matrix. * @param {number[]} array - Any one-dimensional array of numbers. * @param {number[]} [target] - Target array for receiving the result. * @returns Product of the given values as an array. */ export declare function multiplyMatrixAndArray(matrix: number[][], array: number[], target?: number[]): number[]; /** * Calculates the difference between two angles in range of -PI to PI. * @param angleA - the angle to subtract from * @param angleB - the angle to subtract */ export declare function angleDifference(angleA: number, angleB: number): number; /** * Calculates the direction angle from one vector to another. * @param referencePosition * @param targetPosition */ export declare function getDirectionAngle(referencePosition: p5.Vector, targetPosition: p5.Vector): number; /** * Returns the position on the line segment AB which is closest to the reference point P. * @param {p5.Vector} P - The position of the reference point. * @param {p5.Vector} A - The position of the line segment start point. * @param {p5.Vector} B - The position of the line segment end point. * @param {p5.Vector} target - The vector to receive the result. */ export declare function getClosestPositionOnLineSegment(P: p5.Vector, A: p5.Vector, B: p5.Vector, target: p5.Vector): p5.Vector; /** * Just lerp. * @param startValue - The start value. * @param endValue - The end value. * @param ratio - The ratio between 0 and 1. */ export declare function lerp(startValue: number, endValue: number, ratio: number): number;