Making utils vector angle function much more robust