Hello, I was interested in getting the angle between two vectors and wrote
some code to do it. Might be useful for other people.
def angle(v1, v2):
'''Returns angle between two Vector3's.'''
q = v1.normalized().dot(v2.normalized())
if q < -1.0: return pi
elif q > 1.0: return 0.0
else: return acos(q)
Original issue reported on code.google.com by chris.fl...@gmail.com on 4 Feb 2010 at 4:09
Original issue reported on code.google.com by
chris.fl...@gmail.com
on 4 Feb 2010 at 4:09