2023-02-26 09:38:28 +00:00
|
|
|
namespace InnovEnergy.Lib.Units;
|
|
|
|
|
2023-06-13 11:03:49 +00:00
|
|
|
public sealed class Frequency : Unit
|
2023-02-26 09:38:28 +00:00
|
|
|
{
|
2023-06-13 11:03:49 +00:00
|
|
|
public override String Symbol => "Hz";
|
2023-02-26 09:38:28 +00:00
|
|
|
|
2023-06-13 11:03:49 +00:00
|
|
|
public Frequency(Double value) : base(value)
|
2023-02-26 18:19:16 +00:00
|
|
|
{
|
|
|
|
if (value < 0)
|
|
|
|
throw new ArgumentException(nameof(Frequency) + " cannot be negative", nameof(value));
|
|
|
|
}
|
2023-06-13 11:03:49 +00:00
|
|
|
|
|
|
|
public static implicit operator Frequency(Double d) => new Frequency(d);
|
|
|
|
public static implicit operator Double(Frequency d) => d.Value;
|
2023-02-26 09:38:28 +00:00
|
|
|
}
|