Files
caria-website/module/@popperjs/core@2.11.8/lib/utils/within.js.flow
Christian CUNAT-BRULE 5db1c28fd8
All checks were successful
Déploiement DEV / deploy (push) Successful in 9s
Ajout des modules
2026-08-06 20:51:00 +02:00

12 lines
329 B
Plaintext

// @flow
import { max as mathMax, min as mathMin } from './math';
export function within(min: number, value: number, max: number): number {
return mathMax(min, mathMin(value, max));
}
export function withinMaxClamp(min: number, value: number, max: number) {
const v = within(min, value, max);
return v > max ? max : v;
}