ValueIn() 공개 메소드

public ValueIn ( IUnitType unitType ) : double
unitType IUnitType
리턴 double
예제 #1
0
 public Unit <T> Subtract(Unit <T> unit)
 {
     return(new Unit <T>((T)this.UnitType, this._IntrinsicValue - unit.ValueIn(this.UnitType)));
 }
예제 #2
0
 public double Divide(Unit <T> divisor)
 {
     return(this._IntrinsicValue / (divisor.ValueIn(this.UnitType)));
 }
예제 #3
0
        //public override Unit Multiply(Unit unit)
        //{
        //    var type = DerivedUnitType.Multiply(this.UnitType, unit.UnitType);

        //    return new Unit<DerivedUnitType>(type, this.Measurement*unit.Measurement);
        //}

        //public override Unit Invert()
        //{
        //    return new Unit<DerivedUnitType>(new DerivedUnitType(Dimensions.Invert()), 1.0 / Measurement);
        //}

        //public Unit<DerivedUnitType> ToThe(int power)
        //{
        //    var type = DerivedUnitType.Power(this.UnitType, power);
        //    return new Unit<DerivedUnitType>(type, this.Measurement ^ power);
        //}

        public Unit <T> Add(Unit <T> unit)
        {
            return(new Unit <T>((T)this.UnitType, this._IntrinsicValue + unit.ValueIn(this.UnitType)));
        }