mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Port character records from CD * Make species' base scales respected by CD heights * Hide the height editor in the humanoid profile editor --------- Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
17 lines
483 B
C#
17 lines
483 B
C#
namespace Content.Client._CD.Records.UI;
|
|
|
|
public static class UnitConversion
|
|
{
|
|
public static string GetImperialDisplayLength(int lengthCm)
|
|
{
|
|
var heightIn = (int) Math.Round(lengthCm * 0.3937007874 /* cm to in*/);
|
|
return $"({heightIn / 12}'{heightIn % 12}'')";
|
|
}
|
|
|
|
public static string GetImperialDisplayMass(int massKg)
|
|
{
|
|
var weightLbs = (int) Math.Round(massKg * 2.2046226218 /* kg to lbs */);
|
|
return $"({weightLbs} lbs)";
|
|
}
|
|
}
|