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

Function isDimensionless

src/compute-engine/numerics/unit-data.ts:222–232  ·  view source on GitHub ↗
(dim: DimensionVector)

Source from the content-addressed store, hash-verified

220 '\u00C5': { dimension: [1, 0, 0, 0, 0, 0, 0, 0], scale: 1e-10 }, // Å
221
222 // ---- Currency (8th dimension) ----
223 // Only USD is represented. EUR/GBP/etc. have no fixed exchange rate to USD,
224 // so they are deliberately unrepresentable rather than encoded with a wrong
225 // (drifting) scale — same principle as the "NO ton(s) alias" note in
226 // definitions-units.ts.
227 'USD': { dimension: [0, 0, 0, 0, 0, 0, 0, 1], scale: 1 },
228 'cent': { dimension: [0, 0, 0, 0, 0, 0, 0, 1], scale: 0.01 },
229};
230
231// ---------------------------------------------------------------------------
232// Internal helpers
233// ---------------------------------------------------------------------------
234
235export function dimensionsEqual(

Callers 2

units.test.tsFile · 0.90
simplifyQuantityUnitFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected