Ejemplo n.º 1
0
        public IAngularCollection Subtract(IAngularCollection array)
        {
            if (this.Length != array.Length)
            {
                throw new NotImplementedException();
            }

            AngularCollection <T> result = new AngularCollection <T>(this.Length, this.Range);

            for (int i = 0; i < this.Length; i++)
            {
                result.SetValue(i, this[i].Subtract(array[i]));
            }

            return(result);
        }
Ejemplo n.º 2
0
        public IAngularCollection MultiplyAllValuesWith(double value)
        {
            AngularCollection <T> result = new AngularCollection <T>(this.Length, this.Range);

            for (int i = 0; i < this.Length; i++)
            {
                T tempValue = new T();

                tempValue.Range = this.Range;

                tempValue.Value = this.GetTheValue(i) * value;

                result.SetValue(i, tempValue);
            }

            return(result);
        }
Ejemplo n.º 3
0
        public IAngularCollection DivideAllValuesAsDenominator(double numerator)
        {
            AngularCollection <T> result = new AngularCollection <T>(this.Length, this.Range);

            for (int i = 0; i < this.Length; i++)
            {
                T tempValue = new T();

                tempValue.Range = this.Range;

                tempValue.Value = numerator / this.GetTheValue(i);

                result.SetValue(i, tempValue);
            }

            return(result);
        }
Ejemplo n.º 4
0
        public IAngularCollection SubtractAllValuesFrom(double value)
        {
            AngularCollection <T> result = new AngularCollection <T>(this.Length, this.Range);

            for (int i = 0; i < this.Length; i++)
            {
                T tempValue = new T();

                tempValue.Range = this.Range;

                tempValue.Value = value - this.GetTheValue(i);

                result.SetValue(i, tempValue);
            }

            return(result);
        }