Skip to content
lsl.devlsl.devLSL Dev

llAngleBetween

function
Function syntax
float llAngleBetween(
  1. rotation start_rot,// Starting rotation.
  2. rotation end_rot// Ending rotation.
);
Returns
float
Energy
10

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

How to use
float result = llAngleBetween(ZERO_ROTATION, ZERO_ROTATION);
Example 1
default
{
touch_start(integer num_detected)
{
rotation currentRootRotation = llGetRootRotation();
float angle = llAngleBetween(ZERO_ROTATION, currentRootRotation);
// PUBLIC_CHANNEL has the integer value 0
llSay(PUBLIC_CHANNEL,
"llAngleBetween(ZERO_ROTATION, " + (string)currentRootRotation + ") = " + (string)angle);
}
}

From the issue templates included by the wiki article:

  • SVC-2424: type=bug|llAngleBetween() is sometimes inaccurate
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.