Projected trajectories - Box2D tutorials - iforce2d
The function calculateVerticalVelocityForHeight is used to find the vertical component of the launch speed, and the time taken to arrive at the maximum height is then calculated using the n = -v/a-1 formula above (see the ''getTimeToTop'' function in the source code).