1 | import { CommandA, CommandC } from "./types";
|
---|
2 | export declare function rotate([x, y]: [number, number], rad: number): number[];
|
---|
3 | export 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 | */
|
---|
11 | export 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 | */
|
---|
22 | export declare function intersectionUnitCircleLine(a: number, b: number, c: number): [number, number][];
|
---|
23 | export declare const DEG: number;
|
---|
24 | export declare function lerp(a: number, b: number, t: number): number;
|
---|
25 | export declare function arcAt(c: number, x1: number, x2: number, phiDeg: number): number;
|
---|
26 | export declare function bezierRoot(x0: number, x1: number, x2: number, x3: number): number[];
|
---|
27 | export declare function bezierAt(x0: number, x1: number, x2: number, x3: number, t: number): number;
|
---|
28 | export declare function a2c(arc: CommandA, x0: number, y0: number): CommandC[];
|
---|