Hi,
For some reason I can't find any good solutions for formating for example floats.
If I have for example 1.23456 and i want it to be formatted to two decimals 1.23??
Right now I made my own function, where i multiply by 100 and round it and then divide by 100, but it seems that there should be a better/more efficient way of doing this??
I know this function isn't totally correct, but for my case that is not an issue.
testFun fl = let first = fl*100
sec = round first
third = toFloat sec / 100.0
in third
main = asText (testFun 1.2345678)
Cheers