Angle Between Two Vectors: Difference between revisions
Jump to navigation
Jump to search
New page: Two methods for finding the angle between two vectors. The advantage of the first is that the vectors need not be normalized. If you know you have normal vectors then you can use the secon... |
m categorising LSL |
||
Line 3: | Line 3: | ||
<lsl>angle = llAtan2( llVecMag(A % B), A * B )</lsl> | <lsl>angle = llAtan2( llVecMag(A % B), A * B )</lsl> | ||
<lsl>angle = llAcos( A * B )</lsl> | <lsl>angle = llAcos( A * B )</lsl> | ||
{{LSLC|Examples|Angle Between Two Vectors}} |
Revision as of 23:23, 11 April 2009
Two methods for finding the angle between two vectors. The advantage of the first is that the vectors need not be normalized. If you know you have normal vectors then you can use the second method.
<lsl>angle = llAtan2( llVecMag(A % B), A * B )</lsl> <lsl>angle = llAcos( A * B )</lsl>