Raised This Month: $ Target: $400
 0% 

Float problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-07-2011 , 06:46   Float problem
Reply With Quote #1

Hey, Why do I get round float ?

I've code:

PHP Code:
new 6436
new 1544

get_float_ab
()
{
    return 
float:( a/1.0 );

Then I'm printing it as a message:
PHP Code:
client_print(0print_chat"a / b = %0.1f"get_float_ab() ) 
And it prints:

a / b = 4.0

As the result should be 6436 / 1544 = 4.1 ( 4.168... )
reinert is offline
 


Thread Tools
Display Modes

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 04:17.


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