// Script that contains commonly-used utility funcitons
// Author: InnerTri


// utility functions
export function getRandomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return (Math.floor(Math.random() * ((max - min) + 1))) + min;
}

export function getRandomFloat(min, max) {
	return (Math.random() * (max - min)) + min
}

export function clamp(number, min, max) {
	return Math.max(min, Math.min(number, max));
}

export function roundToInt(number) {
	return Math.round(number * 100) / 100;
}

export function roundToDouble(number) {
	return Math.round(number * 100) / 100;
}