MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / areCompatibleUnits

Function areCompatibleUnits

src/compute-engine/numerics/unit-data.ts:320–325  ·  view source on GitHub ↗
(a: string, b: string)

Source from the content-addressed store, hash-verified

318// ---------------------------------------------------------------------------
319// Public API
320// ---------------------------------------------------------------------------
321
322/**
323 * Return the dimension vector for `symbol`, or `null` if unknown.
324 *
325 * Handles direct units (m, kg, N, ...) and prefixed units (km, MHz, ...).
326 */
327export function getUnitDimension(symbol: string): DimensionVector | null {
328 const entry = resolveUnit(symbol);

Callers 1

units.test.tsFile · 0.90

Calls 2

getUnitDimensionFunction · 0.85
dimensionsEqualFunction · 0.85

Tested by

no test coverage detected