In Can TikZ dashed lines emulate PSTricks dashed lines?, @Dominic asked if one can balance the dash pattern so that an ant living on the curve cannot distinguish the two ends.
Same problem arise naturally in PGF/TikZ decorations, for example
\documentclass[border=9,tikz]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\tikz[decoration={snake,pre length=2mm,post length=2mm,segment length=4mm}]
\draw[<->,decorate](0,0)--(2,0);
\end{document}
Notice that 2cm = 2mm + 2mm + 4mm*4, so the decoration should be exact. But even so I did not get a balanced decoration.
The general question is
Given
pre length=post lengthandsegment length, can one manipulate the underlying mechanism so that the de facto pre-length and post-length coincide?
P.S. the library calculates the total length of the curve for you.

\foreach\i in{5,10,...,33}so the final length is not33but an awkward number30. Thus we still have to do the pathetic computation... – Symbol 1 Nov 09 '17 at 17:37