1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00
Files
pawkey-sk/packages/frontend-shared/js/math.ts
Julia Johannesen 0bb4e57b0c Security fixes
Co-Authored-By: dakkar <dakkar@thenautilus.net>
2025-04-27 13:05:09 -04:00

11 lines
257 B
TypeScript

/*
* SPDX-FileCopyrightText: dakkar and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function clamp(value: number, min: number, max: number) {
if (value > max) return max;
if (value < min) return min;
return value;
}