Updated angles function to output parameters
Xcode isn't working