15 lines
451 B
C#
15 lines
451 B
C#
namespace InnovEnergy.Lib.Units;
|
|
|
|
public sealed class Frequency : Unit
|
|
{
|
|
public override String Symbol => "Hz";
|
|
|
|
public Frequency(Double value) : base(value)
|
|
{
|
|
if (value < 0)
|
|
throw new ArgumentException(nameof(Frequency) + " cannot be negative", nameof(value));
|
|
}
|
|
|
|
public static implicit operator Frequency(Double d) => new Frequency(d);
|
|
public static implicit operator Double(Frequency d) => d.Value;
|
|
} |