Forum Discussion

agmark's avatar
agmark
Visitor
14 years ago

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 numbers from external sources and they come in unformatted. For example: 160 or 160.9 or 160.95 or 160.955 or -160 etc. I need a to format as 160.95 or -160.95. I'm sure I could come up with some hack to do it, but there's probably a better way than I'm coming up with.
TIA
Mark

11 Replies