$s = $s * $sat; $s = min($s,1);