The Daily Click ::. Forums ::. Klik Coding Help ::. Rounding to a specific decimal place
 

Post Reply  Post Oekaki 
 

Posted By Message

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
12th March, 2009 at 01:22:32 -

How would one go about doing this in MMF2? Extensions allowed. There's that whole round function but I'd like to display the resulting figure to the first or second rounded decimal place. Chief.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
12th March, 2009 at 01:33:33 -

if your numbers aren't going to be ridiculously big, can't you just multiply it by 10^x, then round it, then divide it by 10^x

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
12th March, 2009 at 01:39:37 -

The numbers are very big, unfootunately.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
12th March, 2009 at 03:50:35 -

I forgot how I did it, but I think I put it into a counter. The counter has those decimal place settings, right?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
12th March, 2009 at 05:30:30 -

Tried throwing it into a counter but retrieving the value only brings back the mega long decimal figures.

Basically what I'm trying to do is get a simple bit o' recorded data-
(global value 1/880000)

But to have it displayed back in a string.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

nim



Registered
  17/05/2002
Points
  7234
12th March, 2009 at 07:20:43 -

Set Alterable String to Str$(Floor((Global Value A/8800.0))/100)

Edited by nim

 
//
   

Post Reply



 



Advertisement

Worth A Click