LlAngleBetween - Second Life Wiki

LlAngleBetween

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
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
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llAngleBetween() is sometimes inaccurate

Examples

See Also

Functions

•  llRotBetween
•  llRot2Angle Similar functionality used for the Axis-Angle format

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
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llAngleBetween() is sometimes inaccurate
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.