Raised This Month: $ Target: $400
 0% 

Round float values


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 08-12-2014 , 08:40   Re: Round float values
Reply With Quote #7

Quote:
Originally Posted by quark View Post
I have a question, I've been searching and i did not understand something. I read that %d and %i are only for integers, so, it round floats or should I use float.inc?
No, it doesn't round floats. It will simply interpret the value you put into it as an int, and it will look like a totally random and unrelated number. You have to round the value using floatround first.
__________________
In Flames we trust!
Nextra is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode