Track_v2: Add helper to keep forward/backward ordering more uniform
- add a helper which 'promotes' a boolean value into a type
- use the above helper to promote the forward/backward flag into either 'increasingByZ' or 'decreasingByZ' type, and use this to make the the order-dependent code independent of the order
Edited by Marco Cattaneo