Sha256: c2560813bfa1c8ef44294ca9e33a486f4cecc8a9e04d6a8d263d67815e454540
Contents?: true
Size: 286 Bytes
Versions: 36
Compression:
Stored size: 286 Bytes
Contents
var $ = require('../internals/export'); var min = Math.min; var max = Math.max; // `Math.clamp` method // https://rwaldron.github.io/proposal-math-extensions/ $({ target: 'Math', stat: true }, { clamp: function clamp(x, lower, upper) { return min(upper, max(lower, x)); } });
Version data entries
36 entries across 35 versions & 9 rubygems