public override LinearUnit Divide(LinearUnit value)
        {
            Meter tempValue = (Meter)value.ChangeTo <Meter>();

            //tempValue.Prefix = this.Prefix;

            return(new Meter(this.Value / tempValue.Value));//, this.Prefix);
        }
        public override int CompareTo(LinearUnit other)
        {
            Meter firstValue  = this;
            Meter secondValue = (Meter)other.ChangeTo <Meter>();

            //firstValue.Prefix = secondValue.Prefix;

            return(firstValue.Value.CompareTo(secondValue.Value));
        }
        public void SetValue(int index, LinearUnit value)
        {
            if (index >= this.Length || index < 0)
            {
                throw new OutOfBoundIndexException();
            }
            else
            {
                LinearUnit tempValue = value.ChangeTo <T>();

                this.values[index] = tempValue.Value;
            }
        }
Exemple #4
0
 public override int CompareTo(LinearUnit other)
 {
     return(this.Value.CompareTo(other.ChangeTo <Rod>().Value));
 }
Exemple #5
0
 public override LinearUnit Divide(LinearUnit value)
 {
     return(new Rod(this.Value / value.ChangeTo <Rod>().Value));
 }
Exemple #6
0
 public override LinearUnit Multiply(LinearUnit value)
 {
     return(new Rod(this.Value * value.ChangeTo <Rod>().Value));
 }
Exemple #7
0
 public override LinearUnit Subtract(LinearUnit value)
 {
     return(new Rod(this.Value - value.ChangeTo <Rod>().Value));
 }
Exemple #8
0
 public override LinearUnit Add(LinearUnit value)
 {
     return(new Yard(this.Value + value.ChangeTo <Yard>().Value));
 }
Exemple #9
0
 public override LinearUnit Divide(LinearUnit value)
 {
     return(new Chain(this.Value / value.ChangeTo <Chain>().Value));
 }
Exemple #10
0
 public override LinearUnit Divide(LinearUnit value)
 {
     return(new Foot(this.Value / value.ChangeTo <Foot>().Value));
 }
Exemple #11
0
 public override LinearUnit Divide(LinearUnit value)
 {
     return(new Inch(this.Value / value.ChangeTo <Inch>().Value));
 }
Exemple #12
0
 public override LinearUnit Divide(LinearUnit value)
 {
     return(new Mile(this.Value / value.ChangeTo <Mile>().Value));
 }