An extension method for System.Random that provides NextFloat(min, max). It returns random.Float() scaled to the requested range and offset by minValue.
using System;
namespace SWB.Shared;
public static class RandomExtensions
{
public static float NextFloat(
this Random random,
float minValue,
float maxValue )
{
return random.Float() * (maxValue - minValue) + minValue;
}
}