llAngleBetween

From Second Life Wiki
Revision as of 20:16, 1 October 2008 by Strife Onizuka (talk | contribs) (I've copied this from lslwiki but I'm the author so it's all cool.)
Jump to navigation Jump to search

Summary

Function: float llAngleBetween( rotation a, rotation b );
0.0 Forced Delay
10.0 Energy

Returns a float that is the angle between rotation a and b.

• rotation a start rotation
• rotation b end rotation

Examples

See Also

Functions

•  llRotBetween

Deep Notes

<lsl>float AngleBetween(rotation a, rotation b) {

   return 2 * llAcos((a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s)
                 / llSqrt((a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s) * 
                          (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s)));

}</lsl>

Signature

function float llAngleBetween( rotation a, rotation b );