@rwk/physics-math
Version:
Math for physics homework problems
36 lines • 929 B
TypeScript
import { IPFunction } from "./base";
import { Unit } from "./units";
interface Line<U extends Unit> {
fn: IPFunction<number, U>;
}
export interface MouseMoveData {
x: number;
y: number;
offsetX: number;
offsetY: number;
}
export interface AxisRange {
min: number;
max: number;
}
export interface Box {
bottom: number;
top: number;
left: number;
right: number;
}
export interface GraphFormat<A extends Partial<AxisRange> = AxisRange, B extends Partial<Box> = Box> {
domain: A;
range: A;
width: number;
height: number;
margin: Box;
}
export declare let DEFAULT_FORMAT: GraphFormat;
/**
*
* @param defaultWidth
*/
export declare const graph: (defaultWidth: number) => (format?: Partial<GraphFormat<Partial<AxisRange>, Partial<Box>>>) => (lines: Line<Unit>[]) => SVGSVGElement | null;
export {};
//# sourceMappingURL=graph.d.ts.map