mirror of
https://github.com/cupcakearmy/old.nicco.io.git
synced 2024-11-01 08:34:13 +01:00
6 lines
227 B
TypeScript
6 lines
227 B
TypeScript
|
export const Rand = (from: number = 0, to: number = 1, float: boolean = false) => {
|
||
|
const rand = (Math.random() * (to - from)) + from
|
||
|
return float ? rand : rand | 0
|
||
|
}
|
||
|
|
||
|
export const GoldenRatio: number = (1 + Math.sqrt(5)) / 2
|