LlAngleBetween
From Second Life Wiki
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Contents |
Summary
Function: float llAngleBetween( rotation a, rotation b );| 174 | Function ID |
| 0.0 | Delay |
| 10.0 | Energy |
Returns a float that is the angle between rotation a and b.
| • rotation | a | – | start rotation | |
| • rotation | b | – | end rotation |
Caveats
Important Issues
~ Search JIRA for related Bugs| | | SVC-2424 | [c] | llAngleBetween() is sometimes inaccurate |
Deep Notes
float AngleBetween(rotation a, rotation b) { return 2.0 * 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))); }
Issues
~ Search JIRA for related Issues| | | SVC-2424 | [c] | llAngleBetween() is sometimes inaccurate |
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

