function
Function syntax
float llAngleBetween(rotation start_rot,// Starting rotation.rotation end_rot// Ending rotation.
);- Returns
float- Energy
- 10
Returns a float that is the angle in radians between rotation a and rotation b.
float result = llAngleBetween(ZERO_ROTATION, ZERO_ROTATION);Examples
Section titled “Examples”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); }}Known issues
Section titled “Known issues”From the issue templates included by the wiki article:
- SVC-2424: type=bug|llAngleBetween() is sometimes inaccurate
See also
Section titled “See also”Functions
Section titled “Functions”llRotBetweenllRot2Angle— Similar functionality used for the Axis-Angle format
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.