コード例 #1
0
        public SpecificHeatCapacity ConvertTo(SpecificHeatCapacityUnit newUnit)
        {
            // generator : FractionValuesGenerator.Add_ConvertTo
            if (Unit.Equals(newUnit))
            {
                return(this);
            }
            var a = new EnergyMassDensity(Value, Unit.CounterUnit);
            var b = new KelvinTemperature(1, Unit.DenominatorUnit);

            a = a.ConvertTo(newUnit.CounterUnit);
            b = b.ConvertTo(newUnit.DenominatorUnit);
            return(new SpecificHeatCapacity(a.Value / b.Value, newUnit));
        }
コード例 #2
0
 public bool Equals(KelvinTemperature other)
 {
     return Value == other.Value && !(Unit is null) && Unit.Equals(other.Unit);
 }
コード例 #3
0
 public int CompareTo(KelvinTemperature other)
 {
     return UnitedValuesUtils.Compare<KelvinTemperature, KelvinTemperatureUnit>(this, other);
 }