Posted 17 July 2012 - 07:58 PM
Hi
I am making a cobblestone generator to create EMC trash, and I have it mostly working.
It has a variable "a" which is how much cobblestone has been made (1 cobble has an EMC of 1)
Also, a variable "f" which is how many diamonds have been made.
Also a fixed variable "d" = 8192 which is the EMC value of diamond
I have the display showing the raw EMC value, and the amount of diamonds where f = a / d
so if exactly 8192 cobble has been made, it will calculate 8192 / 8192 = 1 diamond
It works fine, but currently has far too many sig figs
it shows it as, for example, 1.4468758765 diamonds.
how can I limit this to only show the number to only 1 decimal place, like 1.4 for the example above.
I'm not too worried about the rounding of the 2nd decimal place if that takes extra coding
thanks very much, hope that wasn't too confusing :P/>/>
I am making a cobblestone generator to create EMC trash, and I have it mostly working.
It has a variable "a" which is how much cobblestone has been made (1 cobble has an EMC of 1)
Also, a variable "f" which is how many diamonds have been made.
Also a fixed variable "d" = 8192 which is the EMC value of diamond
I have the display showing the raw EMC value, and the amount of diamonds where f = a / d
so if exactly 8192 cobble has been made, it will calculate 8192 / 8192 = 1 diamond
It works fine, but currently has far too many sig figs
it shows it as, for example, 1.4468758765 diamonds.
how can I limit this to only show the number to only 1 decimal place, like 1.4 for the example above.
I'm not too worried about the rounding of the 2nd decimal place if that takes extra coding
thanks very much, hope that wasn't too confusing :P/>/>