Use Math.max/min for RR