How would I go about converting a measurement from, for example, 12.5 feet to 12ft 6in? How would I created that second number which reads only the decimal place when multiplying by 12?
right now I have double Measurement01 using other variables and some math to get me the feet in decimals. I send that to a textview with farf.setText(Measurement01 + " " + "ft");
Any help would be appreciated!
Quite simply, where
length
is the floating point length:Substract the integer portion:
Building on @Ry4an's answer: