= 0.0 ? 1.0 : -1.0; return $weighted_sum; } }