Difference between revisions of "LlRot2Angle/de"

From Second Life Wiki
Jump to navigation Jump to search
(l10n)
 
m (sync)
 
Line 27: Line 27:
|deepnotes=<lsl>float llRot2Angle(rotation a)
|deepnotes=<lsl>float llRot2Angle(rotation a)
{
{
     return llAcos(a.s / llSqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s)) * 2.0;
     return llAcos(llFabs(a.s) / llSqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s)) * 2.0;
}</lsl>
}</lsl>
}}
}}

Latest revision as of 01:41, 16 March 2009

Beschreibung

Funktion: float llRot2Angle( rotation rot );

Gibt eine Gleitkommazahl, welche den Drehwinkel der Rotation rot repräsentiert.

• rotation rot

Nutze diese Funktion in Verbindung mit llRot2Axis.
Um es rückgängig zu machen, verwende llAxisAngle2Rot.

Warnungen

Gibt immer einen positiven Winkel <= PI Radiant. Dies ist der vorzeichenlose minimale Winkel. Eine Rotation von 3/2 PI Radiant (270°) wird einen Winkel von PI/2 Radiant zurück geben, nicht -PI/2.

Alle Issues ~ Nach JIRA-Issues suchen, die sich hierauf beziehen

Beispiele

Siehe auch

Funktionen

•  llAxisAngle2Rot Errechnet Rotation aus gegebenem Winkel und Achse
•  llRot2Axis Errechnet die durch Rotation gegebene Rotationsachse
•  llRot2Up Errechnet die Richtung der lokalen Z-Achse
•  llRot2Fwd Errechnet die Richtung der lokalen X-Achse
•  llRot2Left Errechnet die Richtung der lokalen Y-Achse

Weiterführende Anmerkungen

<lsl>float llRot2Angle(rotation a) {

   return llAcos(llFabs(a.s) / llSqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s)) * 2.0;

}</lsl>

Nach JIRA-Issues suchen, die sich hierauf beziehen

Signature

function float llRot2Angle( rotation rot );
Dieser Artikel war nicht hilfreich für Dich? Vielleicht bringt der zugehörige Artikel im SLinfo Wiki Erleuchtung.