# Reset signal phase when 2 pi is reached

I am given the distance from the source of radiation of the harmonic oscillation to the point of observation $$R$$ and signal frequency $$f$$.

I need to find the phase shift due to this distance.

When calculated using this formula, the signal phase shift exceeds the maximum $$2\pi$$. $$\Delta\varphi=\frac{R\cdot 2\pi}{\lambda}$$

How to write the formula correctly so that the phase incursion is reset to zero when the maximum value is reached?

• use the modulo function $\Delta\phi = \frac{R 2\pi}{\lambda} mod 2 \pi$
– Ben
Feb 7, 2022 at 13:12
• Or $\Delta \phi = \frac{R 2 \pi}{\lambda} \mod 2\pi$. Because LaTeX recognizes \mod and treats it properly when typesetting ($\Delta \phi = \frac{R 2 \pi}{\lambda} \mod 2\pi$). Feb 7, 2022 at 16:00
• I have replaced the inline math and image with MathJax. (edit may be pending). Please check that I did so correctly and consider using MathJax in the future. Feb 8, 2022 at 0:28

$$\Delta \varphi = \mod \left(\frac{ 2 \pi R}{\lambda},2\pi\right)$$
$$\newcommand{\floor}[1]{\lfloor #1 \rfloor}\Delta \varphi = \frac{ 2 \pi R}{\lambda} -2\pi\floor{ \frac{R}{\lambda}}$$
where $$\lfloor \rfloor$$ is the truncation symbol.