Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 6x | /*
Copyright (c) 2018-2019 Uber Technologies, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
// @flow
// Clamp a number between a min and max
export function clamp(num: number, minNum: number, maxNum: number) {
return Math.min(Math.max(num, minNum), maxNum);
}
|