Utilities.cs
v4.0
RoundThis()
public static float RoundThis(float value
, int decimals, Rounding roundingOption = Rounding.Round)RoundToDecimal()
public static float RoundToDecimal(float value, int decimals = 2)RandomFloat()
public static float RandomFloat(float min = 0f, float max = 1f)
// Note max is exclusive, meaning it will never return exactly that value. However,
// mixing methods together can solve this!
// This example will create a random value, and round it to two decimal places. If
// the result of RandomFloat() is 0.9962, then it will be rounded to 1f.
var randomValue => Utilities.RoundToDecimal(RandomFloat());RandomFloatBestOf()
RandomInt()
Last updated