in reply to Re: Some simple math and absolute values
in thread Some simple math and absolute values

This was what I was missing last night! I kept trying to say if $wt/abs($wt) and it was dying in the 0 case, but by turning the 0 to $min in the possible total and then checking $total/abs($total) that solved. it. Thank you.
$total = ($wt || $min) * $price; $total = $total/abs($total) * $price * $min if abs($wt) < $min +;