Example #1
0
 public MeasuredValue(MeasuredValue mValue)
 {
     InitValue();
     if (ToBaseUnitConversionFactor == mValue.ToBaseUnitConversionFactor)
     {
         // Fall: Einheiten gleich
         if (OrderOfMagnitude == mValue.OrderOfMagnitude)
         {
             // Fall: Größenordnungen gleich
             Value = mValue.Value;
         }
         else
         {
             // Fall: Größenordnungen verschieden
             Value = Mag.FromTo(mValue.Value, mValue.OrderOfMagnitude, OrderOfMagnitude);
         }
     }
     else
     {
         // Fall: Einheiten verschieden
         Value = Mag.FromTo(mValue.ValueInBaseUnit * (1 / ToBaseUnitConversionFactor), Mag.OrderOfMagnitudeEnum.One, OrderOfMagnitude);
     }
 }
Example #2
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new PowerInHorsePower((Power)Value));
 }
Example #3
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new TimeInMinutes((Time)Value));
 }
Example #4
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new EnergyInSKE((Energy)Value));
 }
Example #5
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new EnergyInWs <TOrderOfMagnitude>((Energy)Value));
 }
Example #6
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new PowerInWatt <TOrderOfMagnitude>((Power)Value));
 }
Example #7
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new MassInOunce((Mass)Value));
 }
Example #8
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new TimeInSec <TOrderOfMagnitude>((Time)Value));
 }
Example #9
0
 public abstract MeasuredValue Create(MeasuredValue Value);
Example #10
0
 public override MeasuredValue Create(MeasuredValue Value)
 {
     return(new MassInGram <TOrderOfMagnitude>((Mass)Value));
 }