Let $ \Omega $ be an open and bounded subset of $ \mathbb{R^n} $, and let $ f:\Omega \to \mathbb{R} $ be a continuous function. I'm looking for some (preferably, minimal) conditions on $ f $ under which, for some $ M \ge 0 $,

$ \frac{diam(f(B(x,2r)))}{diam(f(B(x,r)))} \le M $

for all $ B(x,2r) \subseteq \Omega $ when $ diam(f(B(x,r))) > 0 $.

Any help would be greatly appreciated.

Thanks.