// calibrage.ts — helpers numériques du noyau. // // Origine : calculs/src/lib/autonomie/calibrage.js. Correction LOT P1.0 : le // singleton `_config` (initConfig / getConfig) est retiré, la configuration // passe en paramètre (Reglages) chez les cinq appelants. ORIENTATION_FACTORS et // DJU_DEFAULTS_BY_ZONE vivent désormais dans commun/coefficients.ts (une seule // définition, sourcée) ; ZONE_BIOGEO_MAP et zoneRtToClass dans commun/contexte.ts. export { ZONE_BIOGEO_MAP, zoneRtToClass } from '../../commun/contexte.js'; export function clamp01(x) { return Math.max(0, Math.min(1, x)); } export function clamp(x, min, max) { return Math.max(min, Math.min(max, x)); } export function roundToStep(value, step) { if (!step || step <= 0) return value; return Math.round(value / step) * step; }