Minor tweak - use `-(1<<31)` instead of Math.pow(2,31). It's most likely faster (pure integer math).