@khanacademy/kmath 0.1.24 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import type { Coord } from "@khanacademy/perseus-core";
2
+ export declare function convertDegreesToRadians(degrees: number): number;
3
+ export declare function calculateAngleInDegrees([x, y]: Coord): number;
4
+ export declare function polar(r: number | Coord, th: number): Coord;
5
+ export declare const getAngleFromVertex: (point: Coord, vertex: Coord) => number;
6
+ export declare const getClockwiseAngle: (coords: [Coord, Coord, Coord], allowReflexAngles?: boolean) => number;
@@ -0,0 +1,11 @@
1
+ import type { SineCoefficient } from "./geometry";
2
+ import type { Coord } from "@khanacademy/perseus-core";
3
+ export type NamedSineCoefficient = {
4
+ amplitude: number;
5
+ angularFrequency: number;
6
+ phase: number;
7
+ verticalOffset: number;
8
+ };
9
+ export declare function getSinusoidCoefficients(coords: ReadonlyArray<Coord>): SineCoefficient;
10
+ export type QuadraticCoefficient = [number, number, number];
11
+ export declare function getQuadraticCoefficients(coords: ReadonlyArray<Coord>): QuadraticCoefficient;