UNPKG

@nativewrappers/client

Version:

Javascript/Typescript wrapper for the FiveM natives

11 lines (10 loc) 286 B
export class Maths { static clamp(num, min, max) { return num <= min ? min : num >= max ? max : num; } static getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min)) + min; } }