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); }
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); }
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); }
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); }