Replaced asin with atan2 in add_vectors()