Esempio n. 1
0
 /// <summary>
 /// Fills the specified array of doubles with random numbers in the interval [0,1).
 /// </summary>
 /// <param name="array">An array of single-precision floating point numbers.</param>
 public void Fill(FloatArrayList array)
 {
     for (int i = 0; i < array.Count; i++)
     {
         array[i] = NextFloat();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Vector2F"/> class with the specified coordinates.
        /// </summary>
        /// <param name="coordinates">An array containing the coordinate parameters.</param>
        public Vector2F(FloatArrayList coordinates)
        {
            Debug.Assert(coordinates != null);
            Debug.Assert(coordinates.Count >= 2);

            _x = coordinates[0];
            _y = coordinates[1];
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Matrix2F"/> structure with the specified values.
        /// </summary>
        /// <param name="elements">An array containing the matrix values in row-major order.</param>
        public Matrix2F(FloatArrayList elements)
        {
            Debug.Assert(elements != null);
            Debug.Assert(elements.Count >= 4);

            _m11 = elements[0]; _m12 = elements[1];
            _m21 = elements[2]; _m22 = elements[3];
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Matrix3F"/> structure with the specified values.
        /// </summary>
        /// <param name="elements">An array containing the matrix values in row-major order.</param>
        public Matrix3F(FloatArrayList elements)
        {
            Debug.Assert(elements != null);
            Debug.Assert(elements.Count >= 9);

            _m11 = elements[0]; _m12 = elements[1]; _m13 = elements[2];
            _m21 = elements[3]; _m22 = elements[4]; _m23 = elements[5];
            _m31 = elements[6]; _m32 = elements[7]; _m33 = elements[8];
        }
Esempio n. 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Vector4F"/> class with the specified coordinates.
        /// </summary>
        /// <param name="coordinates">An array containing the coordinate parameters.</param>
        public Vector4F(FloatArrayList coordinates)
        {
            Debug.Assert(coordinates != null);
            Debug.Assert(coordinates.Count >= 4);

            _x = coordinates[0];
            _y = coordinates[1];
            _z = coordinates[2];
            _w = coordinates[3];
        }
Esempio n. 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Matrix4F"/> structure with the specified values.
        /// </summary>
        /// <param name="elements">An array containing the matrix values in row-major order.</param>
        public Matrix4F(FloatArrayList elements)
        {
            Debug.Assert(elements != null);
            Debug.Assert(elements.Count >= 16);

            _m11 = elements[0]; _m12 = elements[1]; _m13 = elements[2]; _m14 = elements[3];
            _m21 = elements[4]; _m22 = elements[5]; _m23 = elements[6]; _m24 = elements[7];
            _m31 = elements[8]; _m32 = elements[9]; _m33 = elements[10]; _m34 = elements[11];
            _m41 = elements[12]; _m42 = elements[13]; _m43 = elements[14]; _m44 = elements[15];
        }
 /// <summary>
 /// Fills the given array with random numbers.
 /// </summary>
 /// <param name="array">An array to fill.</param>
 /// <remarks>The given array must be initialized before this method is called.</remarks>
 public abstract void Fill(FloatArrayList array);