...
...
|
Re: Percentage
Post your code, if you make the 1000 a variable it'd be better
PHP Code:
|
Re: Percentage
Quote:
Quote:
The other thing is that you're using integers so you are doing integer division which will means that cProgress / Total will always result in 0 provided that cProgress is less than Total. To be able to do this, you need to convert to floating point values before doing the division. Alternatively, if you don't need the full precision, you can use integer division but you need to multiply cProgress by 100 first and then divide by Total: (cProgress * 100) / Total. This will effectively be the truncated value of the method using floating point values. |
Re: Percentage
Quote:
|
Re: Percentage
...
|
Re: Percentage
Quote:
|
Re: Percentage
Quote:
Though the alternative point can do the job. I am not sure how precise the OP wants it. |
Re: Percentage
...
|
All times are GMT -4. The time now is 01:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.