2023-05-24 10:04:01 +00:00
|
|
|
using InnovEnergy.Lib.SrcGen;
|
|
|
|
using InnovEnergy.Lib.SrcGen.Attributes;
|
2023-02-26 14:39:55 +00:00
|
|
|
|
|
|
|
namespace InnovEnergy.Lib.Units;
|
|
|
|
|
2023-05-24 10:04:01 +00:00
|
|
|
[Generate<Operators>("HAS_CONSTRUCTOR")][Generate<Sum>]
|
2023-02-26 14:39:55 +00:00
|
|
|
public readonly partial struct ApparentPower
|
|
|
|
{
|
|
|
|
public static String Unit => "VA";
|
|
|
|
public static String Symbol => "S";
|
2023-05-24 10:04:01 +00:00
|
|
|
|
2023-04-25 09:27:57 +00:00
|
|
|
public ApparentPower(Double value)
|
2023-02-26 14:39:55 +00:00
|
|
|
{
|
|
|
|
if (value < 0) throw new ArgumentException("Apparent power cannot be negative", nameof(value));
|
|
|
|
Value = value;
|
|
|
|
}
|
|
|
|
}
|