transitive-js
Version:
A tool for generating dynamic stylized transit maps that are easy to understand.
66 lines (65 loc) • 2.19 kB
TypeScript
export function fuzzyEquals(a: any, b: any, tolerance?: number): boolean;
export function distance(x1: any, y1: any, x2: any, y2: any): number;
export function getRadiusFromAngleChord(angleR: any, chordLen: any): number;
export function ccw(ax: any, ay: any, bx: any, by: any, cx: any, cy: any): number;
export function ccwRaw(ax: any, ay: any, bx: any, by: any, cx: any, cy: any): number;
export function angleFromThreePoints(ax: any, ay: any, bx: any, by: any, cx: any, cy: any): number;
export function pointAlongArc(x1: any, y1: any, x2: any, y2: any, r: any, theta: any, ccw: any, t: any): {
x: any;
y: any;
};
export function getVectorAngle(x: any, y: any): number;
export function rayIntersection(ax: any, ay: any, avx: any, avy: any, bx: any, by: any, bvx: any, bvy: any): {
intersect: boolean;
u: number;
v: number;
};
export function lineIntersection(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any): {
intersect: boolean;
x?: undefined;
y?: undefined;
} | {
intersect: boolean;
x: number;
y: number;
};
/**
* Parse a pixel-based style descriptor, returning an number.
*
* @param {String/Number}
*/
export function parsePixelStyle(descriptor: any): number;
/**
* Whether vector is projected into positive xy quadrant.
*/
export function isOutwardVector(vector: any): boolean;
/**
* vector utilities
*/
export function normalizeVector(v: any): {
x: number;
y: number;
};
export function rotateVector(v: any, theta: any): {
x: number;
y: number;
};
export function negateVector(v: any): {
x: number;
y: number;
};
export function addVectors(v1: any, v2: any): {
x: any;
y: any;
};
/**
* GTFS utilities
*/
export function otpModeToGtfsType(otpMode: any): 0 | 1 | 2 | 3 | 5 | 4 | 6 | 7 | undefined;
export function renderDataToSvgPath(renderData: any): any;
export const sm: any;
/**
* @param {*} fontSize A CSS font size or a numerical (pixel) font size.
* @returns A CSS font size ending with the provided CSS unit or 'px' if none provided.
*/
export function getFontSizeWithUnit(fontSize: any): string;