Measures a to b with the named ruler, so a rule authored as data (a table row, a authored profile) can pick its geometry without importing each ruler by name.
a
b
import { distance } from '@datamoc/mwg/core';distance('chebyshev', { x: 0, y: 0 }, { x: 3, y: 4 }); // 4distance('euclidean', { x: 0, y: 0 }, { x: 3, y: 4 }); // 5 Copy
import { distance } from '@datamoc/mwg/core';distance('chebyshev', { x: 0, y: 0 }, { x: 3, y: 4 }); // 4distance('euclidean', { x: 0, y: 0 }, { x: 3, y: 4 }); // 5
Measures
atobwith the named ruler, so a rule authored as data (a table row, a authored profile) can pick its geometry without importing each ruler by name.