prettify, sorry for the big ass commit

This commit is contained in:
Olivier Gagnon
2021-09-04 19:09:30 -04:00
parent 3d7cdb4ef9
commit a18bdd6afc
554 changed files with 91615 additions and 66138 deletions
+4 -4
View File
@@ -5,9 +5,9 @@ import { getRandomInt } from "./getRandomInt";
* @param max The maximum value (up to 255).
*/
export function getRandomByte(max: number): number {
// Technically 2^8 is 256, but the values are 0-255, not 1-256.
const byteMaximum = 255;
const upper: number = Math.max(Math.min(max, byteMaximum), 0);
// Technically 2^8 is 256, but the values are 0-255, not 1-256.
const byteMaximum = 255;
const upper: number = Math.max(Math.min(max, byteMaximum), 0);
return getRandomInt(0, upper);
return getRandomInt(0, upper);
}