Is there something like short if else = (cond) ? true : false statement, but to pass the result of condition to { }? Or maybe some other ideas how to write this kind of code more elegant?
double t_day = day * 0.15;
if (t_day < 1) { t_day = 1; }
maybe something like
double t_day = (day * 0.15) ? day * 0.15 : 1;
but without additional calculating?
Don’t forget the period after the
1as the compiler will not be able to deduce the correctdoubletemplate parameter (and you end up with weird compiler errors).