source: imaps-frontend/node_modules/@popperjs/core/lib/utils/within.js.flow

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 329 bytes
Line 
1// @flow
2import { max as mathMax, min as mathMin } from './math';
3
4export function within(min: number, value: number, max: number): number {
5 return mathMax(min, mathMin(value, max));
6}
7
8export function withinMaxClamp(min: number, value: number, max: number) {
9 const v = within(min, value, max);
10 return v > max ? max : v;
11}
Note: See TracBrowser for help on using the repository browser.