static inline min / max