Generate a random floating point number in given range

JavaScript version
const randomFloat = (min, max) => Math.random() * (max - min) + min;
TypeScript version
const randomFloat = (min: number, max: number): number => Math.random() * (max - min) + min;