// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. #pragma once #include namespace Random { /// /// Generates a pseudo-random number from normalized range [0;1]. /// /// The random number. inline float Rand() { return (float)rand() / (float)RAND_MAX; } /// /// Generates a pseudo-random number from specific range. /// /// The minimum value (inclusive). /// The maximum value (inclusive). /// The random number. inline float RandRange(float min, float max) { return min + (max - min) * Rand(); } }