public void SetValue(int index, AngularUnit value) { if (index >= this.Length || index < 0) { throw new OutOfBoundIndexException(); } else { AngularUnit tempValue = value.ChangeTo <T>(); tempValue.Range = this.Range; this.values[index] = tempValue.Value; } }
public override int CompareTo(AngularUnit other) { return(this.Value.CompareTo(other.ChangeTo <Degree>().Value)); }
public override AngularUnit Divide(AngularUnit value) { return(new Degree(this.Value / value.ChangeTo <Degree>().Value, this.Range)); }
public override AngularUnit Multiply(AngularUnit value) { return(new Degree(this.Value * value.ChangeTo <Degree>().Value, this.Range)); }
public override AngularUnit Subtract(AngularUnit value) { return(new Degree(this.Value - value.ChangeTo <Degree>().Value, this.Range)); }
public override AngularUnit Add(AngularUnit value) { return(new Grade(this.Value + value.ChangeTo <Grade>().Value, this.Range)); }