MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / assertInClosedRange

Function assertInClosedRange

examples/acceptance/animation-controller.ts:11–25  ·  view source on GitHub ↗
(
  label: string,
  actual: number,
  minInclusive: number,
  maxInclusive: number,
)

Source from the content-addressed store, hash-verified

9};
10
11const assertInClosedRange = (
12 label: string,
13 actual: number,
14 minInclusive: number,
15 maxInclusive: number,
16): void => {
17 assert(
18 Number.isFinite(actual),
19 `${label}: expected finite number but got ${actual}`,
20 );
21 assert(
22 actual >= minInclusive && actual <= maxInclusive,
23 `${label}: expected in [${minInclusive}, ${maxInclusive}] but got ${actual}`,
24 );
25};
26
27// Scalar tween: 0 -> 100 over 300ms, monotonic easing, discrete updates at 0/150/300.
28// - first update yields ~0

Callers 1

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected