There are some comments below. I hope this will point you in the right
direction.
/* Yours :: $percentage=(($target_score/($fleet_score+$total_score))*.4)*100; */
/* From looking at the math you do on the calculator you may want to try this
instead. */
$percentage=(($target_score/($fleet_score+$total_score)*.4))*100;
/* or break it apart */
$divisor = ($fleet_score + $total_score) * .4;
$divide = $target_score / divisor;
$percentage = $divide * 100;
if ($percentage >= 10) {
$percentage='10';
$capped=$target_roids*($percentage/100);
// Print the vars to check math! ;-)
print("Percentage: $percentage | Capped: $capped");
} else {
$capped=$target_roids*($percentage/100);
// Print the vars to check math! ;-)
print("Percentage: $percentage | Capped: $capped");
}
Good Luck!
Nathan Cook
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]