mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
0daf83ac51
Summary: This change re-applies D41745930 (2e3dbe9c2f
) (and D42805202 (1479b2ac26
) which was also partially reverted), re-registers additions as moves, then applies D43063551 which has been added to the changes since migration. Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D43068114 fbshipit-source-id: 72997700bf9962d82a988599481e255b69e68a9b
24 lines
428 B
JavaScript
24 lines
428 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @flow strict
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
function clamp(min: number, value: number, max: number): number {
|
|
if (value < min) {
|
|
return min;
|
|
}
|
|
if (value > max) {
|
|
return max;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
module.exports = clamp;
|