agmark
14 years agoVisitor
Math Functions
I need to do some formatting of numbers and it seems Brightscript is fairly limited in math functions. Does anyone have a good solution for formatting numbers to 2 decimal places? I'm pulling in num...
v = Int((value + .005) * 100)
units = int(v/100)
decimal = v mod 100
d = decimal.ToStr()
if d < 10 then d = "0" + d
formatted = units.ToStr() + "." + d