Let $f \colon \mathbb{R}^n \to \mathbb{R}^n$ be continuous with $$f(x)-f(y) = C(x,y)(x-y)$$ for all $x,y \in \mathbb{R}^n$ and a function $C = C(x,y) \colon \mathbb{R}^n \times \mathbb{R}^n \to\mathbb{R}$. Then $f(x) = ax+b$ for some $a\in \mathbb{R}$ and $ b\in \mathbb{R}^n$.
I read this statement in a proof and was wondering if this is true. Does anyone know a reference?