Restore comment because it's still relevant.  Move startToEndPolarVector down below just before it's needed.