The `if` condition at the top should find a perp axis, not choose a random one.
The
ifcondition at the top should find a perp axis, not choose a random one.