Innovenergy_trunk/csharp/Lib/Units/Composite/DcPhase.cs

15 lines
381 B
C#
Raw Normal View History

namespace InnovEnergy.Lib.Units.Composite;
public record DcPhase(Voltage Voltage, Current Current) : Phase(Voltage, Current)
{
public Power Power => Current * Voltage;
2023-02-26 18:19:16 +00:00
public static DcPhase operator +(DcPhase left, DcPhase right)
{
var v = (left.Voltage + right.Voltage) / 2m;
var i = left.Current + right.Current;
return new DcPhase(v, i);
}
}