source: imaps-frontend/node_modules/svg-pathdata/lib/mathUtils.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import { CommandA, CommandC } from "./types";
2export declare function rotate([x, y]: [number, number], rad: number): number[];
3export declare function assertNumbers(...numbers: number[]): boolean;
4/**
5 * https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes
6 * Fixes rX and rY.
7 * Ensures lArcFlag and sweepFlag are 0 or 1
8 * Adds center coordinates: command.cX, command.cY (relative or absolute, depending on command.relative)
9 * Adds start and end arc parameters (in degrees): command.phi1, command.phi2; phi1 < phi2 iff. c.sweepFlag == true
10 */
11export declare function annotateArcCommand(c: CommandA, x1: number, y1: number): void;
12/**
13 * Solves a quadratic system of equations of the form
14 * a * x + b * y = c
15 * x² + y² = 1
16 * This can be understood as the intersection of the unit circle with a line.
17 * => y = (c - a x) / b
18 * => x² + (c - a x)² / b² = 1
19 * => x² b² + c² - 2 c a x + a² x² = b²
20 * => (a² + b²) x² - 2 a c x + (c² - b²) = 0
21 */
22export declare function intersectionUnitCircleLine(a: number, b: number, c: number): [number, number][];
23export declare const DEG: number;
24export declare function lerp(a: number, b: number, t: number): number;
25export declare function arcAt(c: number, x1: number, x2: number, phiDeg: number): number;
26export declare function bezierRoot(x0: number, x1: number, x2: number, x3: number): number[];
27export declare function bezierAt(x0: number, x1: number, x2: number, x3: number, t: number): number;
28export declare function a2c(arc: CommandA, x0: number, y0: number): CommandC[];
Note: See TracBrowser for help on using the repository browser.