User:Tutti Anatine/snippets

From Second Life Wiki
< User:Tutti Anatine
Revision as of 12:19, 31 May 2012 by Tutti Anatine (talk | contribs) (Created page with "''<< Return to Tutti Anatine'' == Degrees to rotation == <lsl> /** * Converts a vector containing xyz-values to a rotation value. * * @param vector A v…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

<< Return to Tutti Anatine

Degrees to rotation

<lsl> /**

* Converts a vector containing xyz-values to a rotation value.
*
* @param vector A vector containing xyz-rotation values in degrees.
* @return vector The converted rotation value.
*/

rotation degrees_to_rotation(vector rot_in_degrees) {

 vector rot_in_radians = rot_in_degrees * DEG_TO_RAD;
 rotation rot = llEuler2Rot(rot_in_radians);
 return rot;

} </lsl>