It is worth noting that although the tangent function (tan) diverges at π/2 it is reversed by the inverse tangent function (i.e. arctan). Anyway, as long as we avoid the exact value of π/2 (which is realized numerically anyway) we can approach π/2 arbitrarily closely without any problem. In fact, we tested this formula in many cases without encountering any problem. We should also note that the negative sign can be reversed by reversing the difference in C (or taking the absolute value). Similarly, we have (where we use the Cartesian version of the velocity profile, i.e. Eq.