You can't put any statements outside functions. If you really need this, use preprocessor directives and macros instead.
Edit: Actually you don't need those if statements. The formula for the center is: center = (max + min) / 2, regardless if min is positive or not.
Bookmarks