45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { Point } from './../models/point.model';
|
|
export declare class NlsMathService {
|
|
/**
|
|
* Calculate distance between to points with coordinates.
|
|
* @param a
|
|
* @param b
|
|
*/
|
|
Δ(a: Point, b: Point): number;
|
|
getClosestCenter(point: Point, matrix: any): any;
|
|
getFarestCenter(point: Point, matrix: any): any;
|
|
randomPoint(matrix: any, overlap: number): {
|
|
x: any;
|
|
y: any;
|
|
};
|
|
centerOfArea(width: any, height: any): Point;
|
|
centerOfPoints(p1: Point, p2: Point): {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
centerOfCurve(curve: Point[]): {
|
|
x: number;
|
|
y: number;
|
|
} & {
|
|
ascent: number;
|
|
};
|
|
medianOfCurve(curve: Point[]): Point & {
|
|
ascent: number;
|
|
};
|
|
angleRadians(p1: Point, p2: Point): number;
|
|
angleDegree(p1: Point, p2: Point): number;
|
|
medianIndex(list: any): number;
|
|
medianPoint(points: Point[]): IterableIterator<Point>;
|
|
/**
|
|
* Generator for sine bounce
|
|
*
|
|
* @param start 0 indicates to initiate with positive numbers, 1 indicates to
|
|
* start with negative numbers first
|
|
* @param amplitude default to 1 indicates the amplitude in positive as well
|
|
* in negative range
|
|
* @param decimals amount of decimal places
|
|
*/
|
|
bounce(amplitude?: number, decimals?: number, start?: number): IterableIterator<number>;
|
|
flipSign(startPositive?: boolean): IterableIterator<number>;
|
|
}
|