|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
400 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var $ = require('../internals/export');
|
|---|
| 3 | var $clamp = require('../internals/math-clamp');
|
|---|
| 4 | var thisNumberValue = require('../internals/this-number-value');
|
|---|
| 5 |
|
|---|
| 6 | // `Number.prototype.clamp` method
|
|---|
| 7 | // https://github.com/tc39/proposal-math-clamp
|
|---|
| 8 | $({ target: 'Number', proto: true, forced: true }, {
|
|---|
| 9 | clamp: function clamp(min, max) {
|
|---|
| 10 | return $clamp(thisNumberValue(this), min, max);
|
|---|
| 11 | }
|
|---|
| 12 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.