Unofficial LSL Reference

[[functions:llanglebetween]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

Function: llAngleBetween

float llAngleBetween(rotation r1, rotation r2)

Return the angle between two rotations.

Parameters

r1

The first rotation

r2

The second rotation

Return value

Returns the angle between the two rotations.

Notes

  • Given two rotations r1 and r2, there is a third rotation that transforms one into the other, given by r2/r1. The angle this function returns is the angle of that last rotation. Therefore, it is roughly equivalent to llRot2Angle(r2/r1).

Short examples

llOwnerSay((string)(llAngleBetween(<0,0,1,0>, <0,1,0,0>)*RAD_TO_DEG)); // displays 180.000000

See also

  • llRotBetween Rotation between two vectors.
  • llRot2Angle obtains the angle part of a rotation expressed as axis/angle.
  • llRot2Axis obtains the axis part of a rotation expressed as axis/angle.
  • rotation type and operations.