Difference between revisions of "Matrix:rotate"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2016.06<br/>
 
'''Available since:''' Gideros 2016.06<br/>
 +
'''Class:''' [[Matrix]]<br/>
 +
 
=== Description ===
 
=== Description ===
Combine existing rotation with provided.
+
Combines the existing rotation with a provided rotation.
It takes a x,y,z vector and an angle, and rotate the matrix around the given vector by the specified angle
+
<syntaxhighlight lang="lua">
<source lang="lua">
+
Matrix:rotate(angle,xVector,yVector,zVector)
Matrix:rotate(angle,x vector,y vector,z vector)
+
</syntaxhighlight>
</source>
+
It takes an x,y,z vector plus an angle, and rotates the Matrix around the given vector by the specified angle.
'''angle''': (number) angle of rotation in radians ''''''<br/>
+
 
'''x vector''': (number) x axis vector ''''''<br/>
+
=== Parameters ===
'''y vector''': (number) y axis vector ''''''<br/>
+
'''angle''': (number) angle of rotation in radians<br/>
'''z vector''': (number) z axis vector ''''''<br/>
+
'''xVector''': (number) x axis vector<br/>
 +
'''yVector''': (number) y axis vector<br/>
 +
'''zVector''': (number) z axis vector<br/>
 +
 
 +
{{Matrix}}

Latest revision as of 14:30, 13 July 2023