Copy link to clipboard
Copied
Hello all,
Bluebeam related question here. I'm running a calculation in a text box form field, and I want it to display the output in traditional fractional inches and feet format. Cannot for the life of me find it anywhere on the web! Essentially, if I have an elevation of "8853.9" outputting from the calculation, how do I write the script for the custom format to diplay this as 8,853' 10 13/16" ?
Copy link to clipboard
Copied
This is not a trivial conversion. The problem, is that the starting point is a potential irrational number, so there won't be a clean conversion.
Here is a page on a Math site that explains the conversion process:
https://www.calculatorsoup.com/calculators/math/decimal-to-fraction-calculator.php
Here's another page that shows a table conversion:
https://www.engineeringtoolbox.com/inches-decimal-equivalents-d_471.html
It think the best strategy is a best match loop. Starting with the chunkier fractions first, then working down to finer grains until it's close enough.