refactor and add comments
don't divide by zero when the stick is in the center!