Use this for the negamax variant of minimax. max(a,b) = -min(-a,-b)

https://en.wikipedia.org/wiki/Negamax