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)));
}
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Rotation