Exemple #1
0
        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 <Grade>().Value));
 }
 public override AngularUnit Divide(AngularUnit value)
 {
     return(new Grade(this.Value / value.ChangeTo <Grade>().Value, this.Range));
 }
 public override AngularUnit Multiply(AngularUnit value)
 {
     return(new Grade(this.Value * value.ChangeTo <Grade>().Value, this.Range));
 }
 public override AngularUnit Subtract(AngularUnit value)
 {
     return(new Grade(this.Value - value.ChangeTo <Grade>().Value, this.Range));
 }
 public override AngularUnit Add(AngularUnit value)
 {
     return(new Radian(this.Value + value.ChangeTo <Radian>().Value, this.Range));
 }
 public override AngularUnit Multiply(AngularUnit value)
 {
     return(new Radian(this.Value * value.ChangeTo <Radian>().Value, this.Range));
 }
 public override AngularUnit Subtract(AngularUnit value)
 {
     return(new Radian(this.Value - value.ChangeTo <Radian>().Value, this.Range));
 }
 public override AngularUnit Add(AngularUnit value)
 {
     return(new Degree(this.Value + value.ChangeTo <Degree>().Value, this.Range));
 }