We study maps of the unit interval whose graph is made up of two increasing segments and which are injective in an extended sense. Such maps f_{\p} are parametrized by a quintuple \p of real numbers satisfying inequations. Viewing f_{\p} as a circle map, we show that it has a rotation number \rho(f_{\p}) and we compute \rho(f_{\p}) as a function of \p in terms of Hecke-Mahler series. As a corollary, we prove that \rho(f_{\p}) is a rational number when the components of \p are algebraic numbers