Make theta2 const by using ternary op