Feet and Inches Conversion Suggestion |
posted by Michael on 06 September 2007 at 9:19 pm Hi,
|
Follow-Up Messages
|
Good Suggestion... But...
posted by Webmaster on 07 September 2007 at 1:19 am Hi Michael,Thank you for the suggestion. I'm afraid to say that implementing a conversion system like this is more difficult than it may sound. My converters are calculators that convert from one unit to one unit. So, adding the ability to convert from one unit to a result containing multiple units in an accurate manner would involve a lot of development time that I do not, unfortunately, have at present. I will throw this open to other people using the site - does anyone know of a website that includes a calculator like the one Michael is after? If so, perhaps they could post a link to it onto this forum thread? Kind Regards Alastair Webmaster |
|
Can I Help You A Bit?
posted by Michael on 07 September 2007 at 4:04 am Well, I don't think there should be complex calculationAll you need it to take your code that converts meters to inches and just little modify result. 1m = 39.370078740157 in int(39.370078740157 / 12) will give you 3 ft int(39.370078740157 - 3ft) will give you 3 in and the rest you might leave just like that without using fractions. What language are you using? maybe i can do that part for you. I know C#, VB.net and little PHP. You can contact me directly to my email |
|
Feet To Inches To Fraction
posted by erik on 24 April 2009 at 2:36 pm Below converts the inches to feet just rightBelow converts the inches left over that would not make another foot I am missing the ability to convert the fraction part. If i can at least get the decimal part then I can do the "1/16","1/8","3/8" ect... protected void AFunction() { int doorWidthInches = 76; object feet = doorWidthInches / 12; //==6' //& " Ft " & object inches = doorWidthInches % 12;//==4" //& "in" // I need --> object decimalPart = ?????// } Thanks for the help.. |
