http://qs321.pair.com?node_id=11117143


in reply to Some simple math and absolute values

Could reduce to 2 statements, does not seem any better ...

$nwt = abs( $wt ); $total = ( $nwt < $min ? $min : $nwt ) * $price * ( $wt < 0 ? -1 : 1 ) ;