I think usage of
reverse in this lines is wrong:
I read the usages of
calcMillis and I think
reverse is always false in non-bidirectional algorithms and is always false in
So we should use something like
edgeState == edgeState.detach(true) instead of
reverse to determine to use speed or reverseSpeed.