21 using UnsignedCostType = std::make_unsigned_t<CostType>;
23 UnsignedCostType AbsValue =
24 (Value < 0) ? -((UnsignedCostType)Value) : ((UnsignedCostType)Value);
25 UnsignedCostType WholeNumber = AbsValue / CostGranularity;
26 UnsignedCostType Remainder = AbsValue % CostGranularity;
29 UnsignedCostType RemainderHundreds = (Remainder * 100) / CostGranularity;
30 while (RemainderHundreds % 10 == 0 && RemainderHundreds)
31 RemainderHundreds /= 10;
33 if (RemainderHundreds)
34 OS <<
"." << RemainderHundreds;