This is a custom calculator for measurements, including feet and inches, with a simplified numeric keypad for easy input on mobile devices.
- Custom Keypad: A numeric keypad is provided to simplify input on mobile devices, especially for measurements involving inches and feet.
- Measurement Parsing: The page uses a combination of JavaScript and regex to parse measurement expressions, allowing users to input values like
1' 2 5/8". - Expression Evaluation The expression is evaluated via an API call to the www.inchcalculator.com service that return a JSON result for presentation. Some cleansing is done before presentation of the results.
- Rounding: The
roundFractionfunction rounds fractional values to common construction-friendly values such as1/8,1/4, and1/2. This ensures that measurements are presented in a practical format.
To add the calculator to your iPhone home screen for easy access:
- Open Safari on your iPhone.
- Navigate to the calculator GitHub Pages URL: https://onleserkey.github.io/inchcalculator.
- Tap the Share button at the bottom of the screen (the icon with an upward arrow).
- Scroll down and tap Add to Home Screen.
- Edit the name if you like, then tap Add.
The calculator will now appear on your home screen like an app.
API Copyright www.inchcalculator.com
Credit for regex expression to https://regexlib.com/REDetails.aspx?regexp_id=2127
