Raised This Month: $ Target: $400
 0% 

Math Equation


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PartialCloning
Senior Member
Join Date: Dec 2015
Old 12-02-2015 , 00:30   Re: Math Equation
Reply With Quote #5

It works, but you have to turn them into floats like you did in your method. But hey the more methods the better.

Quote:
Originally Posted by ot_207 View Post
When you use 50 and 100 simply without dots the compiler uses them as integers.

So basically when you do this
50/100 you will do a integer division and the result will be 0
To fix the float problem you need all the numbers to have dots in order to count as floats.
In your situation the code should be:

(50.0/100.0)*100.0
PartialCloning 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 18:08.


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