Implement forgotten imperial measurement for Height field

This commit is contained in:
Lohikar 2018-09-03 20:52:13 -05:00
parent 513adb71fd
commit 1a821706e2
2 changed files with 5 additions and 2 deletions

View file

@ -13,7 +13,10 @@ namespace AuroraRecordGenerator
public static string CmToFeet(double cm)
{
return "0'0\"";
var feet = Math.Floor(cm * 0.0328084);
var inches = Math.Floor(cm * 0.39370079); // Isn't imperial a lovely system?
inches -= feet * 12;
return $"{feet}'{inches}\"";
}
/// <summary>