posted 14 years ago
Personally, I find your constant names confusing. Both are for converting english to metric, but you don't maintain the same order in the names. I would either do them as
CENTIMETERS_PER_INCH
CENTIMETERS_PER_FOOT
or both as
FEET_TO_CM
INCHES_TO_CM
And really, you don't need both, as you could convert feet to inches, add them to your inches then do one conversion. You'd still need two constants (FEET_TO_INCHES, for example), but since doing an int to a float always brings in some precision loss, only doing one might make your results slightly more accurate. Although, if you only care about things to 1 decimal place, it may not matter.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors