public LinearPowerLoss ConvertTo(LinearPowerLossUnit newUnit)
        {
            // generator : FractionValuesGenerator.Add_ConvertTo
            if (Unit.Equals(newUnit))
            {
                return(this);
            }
            var a = new Power(Value, Unit.CounterUnit);
            var b = new Length(1, Unit.DenominatorUnit);

            a = a.ConvertTo(newUnit.CounterUnit);
            b = b.ConvertTo(newUnit.DenominatorUnit);
            return(new LinearPowerLoss(a.Value / b.Value, newUnit));
        }
Exemplo n.º 2
0
        public Irradiance ConvertTo(IrradianceUnit newUnit)
        {
            // generator : FractionValuesGenerator.Add_ConvertTo
            if (Unit.Equals(newUnit))
            {
                return(this);
            }
            var a = new Power(Value, Unit.CounterUnit);
            var b = new Area(1, Unit.DenominatorUnit);

            a = a.ConvertTo(newUnit.CounterUnit);
            b = b.ConvertTo(newUnit.DenominatorUnit);
            return(new Irradiance(a.Value / b.Value, newUnit));
        }