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; } }
public override LinearUnit Multiply(LinearUnit value) { return(new Yard(this.Value * value.ChangeTo <Yard>().Value)); }
public override LinearUnit Subtract(LinearUnit value) { return(new Yard(this.Value - value.ChangeTo <Yard>().Value)); }
public override LinearUnit Add(LinearUnit value) { return(new Rod(this.Value + value.ChangeTo <Rod>().Value)); }
public override LinearUnit Divide(LinearUnit value) { return(new Inch(this.Value / value.ChangeTo <Inch>().Value)); }
public override LinearUnit Multiply(LinearUnit value) { return(new Inch(this.Value * value.ChangeTo <Inch>().Value)); }
public override LinearUnit Subtract(LinearUnit value) { return(new Inch(this.Value - value.ChangeTo <Inch>().Value)); }
public override LinearUnit Multiply(LinearUnit value) { return(new Chain(this.Value * value.ChangeTo <Chain>().Value)); }
public override LinearUnit Subtract(LinearUnit value) { return(new Chain(this.Value - value.ChangeTo <Chain>().Value)); }
public override LinearUnit Divide(LinearUnit value) { return(new Mile(this.Value / value.ChangeTo <Mile>().Value)); }
public override LinearUnit Multiply(LinearUnit value) { return(new Mile(this.Value * value.ChangeTo <Mile>().Value)); }
public override LinearUnit Subtract(LinearUnit value) { return(new Mile(this.Value - value.ChangeTo <Mile>().Value)); }
public override LinearUnit Divide(LinearUnit value) { return(new Yard(this.Value / value.ChangeTo <Yard>().Value)); }
public override int CompareTo(LinearUnit other) { return(this.Value.CompareTo(other.ChangeTo <Yard>().Value)); }
public override LinearUnit Divide(LinearUnit value) { return(new Chain(this.Value / value.ChangeTo <Chain>().Value)); }