title: c++ more effective way to write this two lines of code comperison to one short line
body: <p>Is there something like short if else <code>= (cond) ? true : false</code> statement, but to pass the result of condition to <code>{ }</code>? Or maybe some other ideas how to write this kind of code more elegant? </p>
  
  <pre><code>double t_day = day * 0.15;
  if (t_day &lt; 1) { t_day = 1; }
  </code></pre>
  
  <p>maybe something like </p>
  
  <pre><code>double t_day = (day * 0.15) ? day * 0.15 : 1;
  </code></pre>
  
  <p>but without additional calculating?</p>