Charles Sanders schreef:
> Roel Schroeven wrote:
>> I might be wrong of course, but can't you just use atan2? Only problem
>> is that it returns negative angles for quadrants 3 and 4, but that is
>> easily solved. In Python:
>>
>> from math import atan2, pi, fmod
>> def vectorAngle(x, y):
>>
Roel Schroeven wrote:
>
> I might be wrong of course, but can't you just use atan2? Only problem
> is that it returns negative angles for quadrants 3 and 4, but that is
> easily solved. In Python:
>
> from math import atan2, pi, fmod
> def vectorAngle(x, y):
> return fmod(atan2(y, x) + 2*pi