Skip to content
lsl.devlsl.devLSL Dev

llRot2Angle

function
Function syntax
float llRot2Angle(
  1. rotation q// Rotation to evaluate.
);
Returns
float
Energy
10

Use in conjunction with llRot2Axis.

To undo use llAxisAngle2Rot.

Returns a float that is the rotation angle represented by rot

How to use
float result = llRot2Angle(ZERO_ROTATION);

This always returns a positive angle <= PI radians, that is, it is the unsigned minimum angle. A rotation of 3/2 PI radians (270 degrees) will return an angle of PI / 2 radians, not -PI / 2.

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.

From the Second Life Wiki

Community documentation adapted from LlRot2Angle, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.