Calc

Feet and Inches Conversion Suggestion

Question asked by Michael:

Hi,

First of all thanks you for great job!

I want to suggest in your length section add (ft + in) so for example
1 meter = 3 ft 3 1/4 in.

Of course this is very approximate value but it is VERY practical also

Follow-up responses...

Good Suggestion... But...

posted by Webmaster:

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:

Well, I don't think there should be complex calculation

All 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:

Below converts the inches to feet just right
Below 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..