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 ) ;