Exemple #1
0
 public static double NextInclusive(this Random random, double minValue, double maxValue)
 {
     return(ScalarExtensions.Lerp(minValue, maxValue, random.NextDouble()));
 }
Exemple #2
0
 public static float NextInclusive(this Random random, float minValue, float maxValue)
 {
     return(ScalarExtensions.Lerp(minValue, maxValue, (float)random.NextDouble()));
 }
Exemple #3
0
 public static float SmoothStep(float x0, float x1, float t)
 {
     t = ScalarExtensions.SmoothStep(t);
     return(x0 + t * (x1 - x0));
 }