if you can get away with it, do a static function here instead. min will be a pretty overloaded define and could impact other code.