/// <summary>
        /// Initializes a new instance of the <see cref="MultidirectionalDynamicArray1D{TValue}"/> class.
        /// </summary>
        /// <param name="dimensions">The dimensions of the array.</param>
        public MultidirectionalDynamicArray1D(Index1D dimensions)
        {
            Contracts.Requires.That(dimensions.IsAllPositive());

            this.array   = new T[dimensions.X];
            this.xOrigin = dimensions.X / 2;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DynamicArray1D{TValue}"/> class.
        /// </summary>
        /// <param name="dimensions">The dimensions of the array.</param>
        public DynamicArray1D(Index1D dimensions)
        {
            Contracts.Requires.That(dimensions.IsAllPositive());

            this.array = new T[dimensions.X];
        }