Feet/Inches Calculation needing 2 decimal points
I have a formula that needs to calculate in Feet and Inches. I have the formula working to calculate correctly, but now I need the inches to be only to 2 decimal points. Please assist in how I get the inches to stop at 2 decimal points. Thank you.
var PoleLenght = this.getField("PoleLenght").value;
if (PoleLenght>0)
{
var distanceInInches = (PoleLenght*0.162)+7.5;
event.value = convertInchesToFeet(distanceInInches);
}
else event.value = "";
function convertInchesToFeet(v)
{
var feet = Math.floor(v/12);
var inches = v%12;
return feet + "'-" + inches + "\"";
}
