Exemplo n.º 1
0
        /// <summary>
        /// Fills the specified array with random floats in the half-open
        /// interval [0.0f, 1.0f).
        /// </summary>
        public static void FillUniform(this IRandomUniform rnd, float[] array)
        {
            long count = array.LongLength;

            for (long i = 0; i < count; i++)
            {
                array[i] = rnd.UniformFloat();
            }
        }
Exemplo n.º 2
0
 public static C3f UniformC3f(this IRandomUniform rnd)
 {
     return(new C3f(rnd.UniformFloat(),
                    rnd.UniformFloat(),
                    rnd.UniformFloat()));
 }