
I finished my Imperial to Metric converter today. It converts inches, feet, yards, and miles to millimeters, centimeters, meters, and kilometers. The result is rounded to 6 decimals, to account for inches to kilometers.
I ended up using four functions, one to get the length and units, one to detect the units and run the conversion, one to round the answer, and one to display the answer. I detected the units using if statements, first checking the imperial measurement then the metric. The page is found here: https://zidri.github.io/ImperialMetricConvert/ or the source code is on my GitHub.
