Hello,
as I'm currently working on a converter between american and european height measurements, I would need a round function aswell. I thought of simply using RTrim to trim the numbers as strings, but I thought there could have been some better alternative there.
So far, I have the following function in Quest:
<function name="HeightConversion" parameters="cmvalue" type="int">
inchvalue = cmvalue * 0.3937
feetvalue = inchvalue * 0.08333333
msg (inchvalue)
msg (feetvalue)
</function>
So my next steps would be:
Cutting the feetvalue to a single digit number (integer) and multiply the result by 12 to get the inch-value.
Substract that inch-value from the variable "inchvalue".
That should give me the height as feetvalue' inchvalue".
I myself am european and use the metric system, but I would like to make something similar to an engine for RPG-elements, and being able to show values such as height and weight in both forms seems like a good idea.