If the initial velocity of the particle has a different direction, one only needs resolve it into a component v ⊥ perpendicular to B and a component v // parallel to B, and replace v in the above formula with v ⊥.