What's the term I'm looking for
airbornflght
Houston, TX Icrontian
Ok, I usually know this but I am having a major brain fart or something because it has escaped me.
ok, if I wanted to take a double value x, say is 12.3425545 and I want to output it out to the 2nd decimal place. I know that I can either do output formating, but can't I also just reassign it all cut off like 12.34 so that is all there is.
What is that called?
ok, if I wanted to take a double value x, say is 12.3425545 and I want to output it out to the 2nd decimal place. I know that I can either do output formating, but can't I also just reassign it all cut off like 12.34 so that is all there is.
What is that called?
0
Comments
I'd say leave it as 12.34532459233253 in memory and just format the output. If you do later calculations with the number, it'll be more accurate if you just leave as much precision in memory as possible.
I am modding the AP CS MBCS a lot. Well, my class is only at chapter 3 and I am just doing everything to it that I think it needs. I'm working on making the fish's offspring mutate randomly. A lot of what I've added is debugging information.