source: trip-planner-front/node_modules/core-js/modules/esnext.math.clamp.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 286 bytes
Line 
1var $ = require('../internals/export');
2
3var min = Math.min;
4var max = Math.max;
5
6// `Math.clamp` method
7// https://rwaldron.github.io/proposal-math-extensions/
8$({ target: 'Math', stat: true }, {
9 clamp: function clamp(x, lower, upper) {
10 return min(upper, max(lower, x));
11 }
12});
Note: See TracBrowser for help on using the repository browser.