Innovenergy_trunk/csharp/Lib/Utils/Units.cs

15 lines
523 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
namespace InnovEnergy.Lib.Utils;
public static class Units
{
public static String Unit(this Object v, String unit) => $"{v} {unit}";
public static String V(this Object v) => v.Unit("V");
public static String W(this Object v) => v.Unit("W");
public static String A(this Object v) => v.Unit("A");
public static String Degrees(this Object v) => v.Unit("°");
public static String Celsius(this Object v) => v.Unit("°C");
public static String Percent(this Object v) => v.Unit("%");
}