2023-02-26 14:43:53 +00:00
|
|
|
using InnovEnergy.Lib.Units.Generator;
|
|
|
|
|
|
|
|
namespace InnovEnergy.Lib.Units;
|
|
|
|
|
|
|
|
|
2023-02-26 18:19:16 +00:00
|
|
|
[Sum]
|
2023-02-26 14:43:53 +00:00
|
|
|
public readonly partial struct Current
|
|
|
|
{
|
|
|
|
public static String Unit => "A";
|
|
|
|
public static String Symbol => "I";
|
|
|
|
|
|
|
|
public Current(Decimal value) => Value = value;
|
|
|
|
|
|
|
|
// P=UI
|
|
|
|
public static Power operator *(Current current, Voltage voltage) => new Power(current.Value * voltage.Value);
|
|
|
|
|
|
|
|
// U=RI
|
|
|
|
public static Voltage operator *(Current current, Resistance resistance) => new Voltage(resistance.Value* current.Value);
|
|
|
|
|
|
|
|
}
|