vpiotr / decimal_for_cpp

Decimal data type for C++
273 stars 68 forks source link

Don't print any decimals when precision is 0 #7

Closed kuriboshi closed 9 years ago

kuriboshi commented 9 years ago

When the precision is 0, i.e. dec::decimal<0>, then printing this value will print a decimal point and one decimal place. I think it should not print either of those. This patch just skips printing the decimal point and anything following if the precision is 0.