@patricksurry/g3
Version:
A flexible Javascript framework for building steam gauge instrument panels that display live external metrics from flight (or other) simulators like XPlane or MS FS2020
11 lines (10 loc) • 528 B
TypeScript
import type { GaugeKind } from './types';
/**
* First and last values of a scale's domain or range.
* Scales can be piecewise with more than two points, e.g.
* d3.scaleLinear().domain([-25, -5, 0, 25]).range([263, 212, 201, 144]),
* so the extremes are the ends, not the first two values.
*/
export declare function ends<T>(vs: T[]): [T, T];
/** Whether a circular gauge's range covers a whole number of full turns, so values wrap around. */
export declare function isFullCircle(kind: GaugeKind, range: number[]): boolean;