Don't click here unless you want to be banned.

LSL Wiki : llAngleBetween

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org
float llAngleBetween(rotation a, rotation b);

Returns angle, in radians, between rotation a and rotation b.

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)));
}


Functions | Rotation
Comments [Hide comments/form]
Attach a comment to this page: