For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > May 2006 > RE: [PHP-WIN] Finding a percentage









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-WIN] Finding a percentage
John Harris

2006-05-31, 8:02 am

On 31 May 2006 at 9:09, Luis Moreira wrote:

> This is not exactly a PHP issue, it is straight math !!!
>
> Percent = value / (max - min)


Don't forget to range the value (if unlike the original question, the
minimum is not zero) and multiply by 100.

Percent = ( (value - min) / (max - min) ) * 100
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com