In the offline player I''m working on a project that calculates phi and pi. I want to know if there is any way to stop scratch from automatically rounding to 15 d.p., because I want to make my project have the calculated decimal places, not 15. thanks in advance. Please?
Last edited by thescratchytim (2013-03-27 09:33:03)
Offline
thescratchytim wrote:
In the offline player I''m working on a project that calculates phi and pi. I want to know if there is any way to stop scratch from automatically rounding to 15 d.p., because I want to make my project have the calculated decimal places, not 15. thanks in advance. Please?
In a single variable, there is no way to just stop rounding. Therefore, you'll have to store your data a different way. One method that you could use is to use your original variable, through now you add a p to the end of the variable to stop rounding. Now, when you're reading the variable, you'll need to ignore (not remove) the p, and you'll have pi!
Now, another method that you could maybe use is to use a list to store your variable. Every item in the list becomes a digit of pi or phi and this way you don't need to worry about rounding.
Just to say, there are a few other methods to accomplish this, though they're not as useful or nice as the two above.
Well I hope that this helps!
With regards,
ErnieParke
Last edited by ErnieParke (2013-03-27 12:02:54)
Offline