Welcome to mirror list, hosted at ThFree Co, Russian Federation.

within.js « utils « esm « dist « package « popperjs - github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da7bf7635ddf154003a9278a9af88bfaf2ef8563 (plain)
1
2
3
4
5
6
7
8
import { max as mathMax, min as mathMin } from "./math.js";
export function within(min, value, max) {
  return mathMax(min, mathMin(value, max));
}
export function withinMaxClamp(min, value, max) {
  var v = within(min, value, max);
  return v > max ? max : v;
}