<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Quat</id>
	<title>Quat - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Quat"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Quat&amp;action=history"/>
	<updated>2026-04-21T23:09:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=Quat&amp;diff=45&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;{{:QuatExampleCode}}  ==Constructor== {| class=&quot;wikitable&quot;  !|function !|description |- |Quat(float x, float y, float z, float w) | |- |Quat(Vec3 axis, float degrees) | |- |Quat() | |- |}  ==Functions== {| class=&quot;wikitable&quot; !|return !|function !|description |- | |createFromRotationMatrix(Matrix mat) |. |- | |createMatrix(Matrix mat) |. |- | |reset() |Clear quat. |...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Quat&amp;diff=45&amp;oldid=prev"/>
		<updated>2025-07-05T13:37:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{:QuatExampleCode}}  ==Constructor== {| class=&amp;quot;wikitable&amp;quot;  !|function !|description |- |Quat(float x, float y, float z, float w) | |- |Quat(&lt;a href=&quot;/index.php/Vec3&quot; title=&quot;Vec3&quot;&gt;Vec3&lt;/a&gt; axis, float degrees) | |- |Quat() | |- |}  ==Functions== {| class=&amp;quot;wikitable&amp;quot; !|return !|function !|description |- | |&lt;a href=&quot;/index.php?title=Quat:createFromRotationMatrix(Matrix_mat)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Quat:createFromRotationMatrix(Matrix mat) (page does not exist)&quot;&gt;createFromRotationMatrix&lt;/a&gt;(&lt;a href=&quot;/index.php/Matrix&quot; title=&quot;Matrix&quot;&gt;Matrix&lt;/a&gt; mat) |. |- | |&lt;a href=&quot;/index.php?title=Quat:createMatrix(Matrix_mat)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Quat:createMatrix(Matrix mat) (page does not exist)&quot;&gt;createMatrix&lt;/a&gt;(&lt;a href=&quot;/index.php/Matrix&quot; title=&quot;Matrix&quot;&gt;Matrix&lt;/a&gt; mat) |. |- | |&lt;a href=&quot;/index.php?title=Quat:reset()&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Quat:reset() (page does not exist)&quot;&gt;reset&lt;/a&gt;() |Clear quat. |...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{:QuatExampleCode}}&lt;br /&gt;
&lt;br /&gt;
==Constructor==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|Quat(float x, float y, float z, float w)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Quat([[Vec3]] axis, float degrees)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Quat()&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:createFromRotationMatrix(Matrix mat)|createFromRotationMatrix]]([[Matrix]] mat)&lt;br /&gt;
|.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:createMatrix(Matrix mat)|createMatrix]]([[Matrix]] mat)&lt;br /&gt;
|.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:reset()|reset]]()&lt;br /&gt;
|Clear quat.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:invert()|invert]]()&lt;br /&gt;
|invert quat.&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Quat:isIdentity()|isIdentity]]()&lt;br /&gt;
|Is identity&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:dot(Quat quat)|dot]](Quat quat)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:fromEuler(float x, float y, float z)|fromEuler]](float x, float y, float z)&lt;br /&gt;
|Create Quat from rotation around axis in radians.&lt;br /&gt;
|-&lt;br /&gt;
|[[Matrix]]&lt;br /&gt;
|[[Quat:getMatrix()|getMatrix]]()&lt;br /&gt;
|get matrix.&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec3]]&lt;br /&gt;
|[[Quat:toEuler()|toEuler]]()&lt;br /&gt;
|get rotaion in radians and return.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:normalize()|normalize]]()&lt;br /&gt;
|Normalize axis scale so that only rotation remains.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:nslerp(Quat a, Quat b, float t)|slerp]](Quat a, Quat b, float t)&lt;br /&gt;
|Creates a value for this Quat from spherical linear interpolation&lt;br /&gt;
t is the interpolation value from 0 to 1&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:nLerp(Quat a, Quat b, float w)|slerp]](Quat a, Quat b, float w)&lt;br /&gt;
|linearly interpolate each component, then normalize the Quat&lt;br /&gt;
Unlike spherical interpolation, this does not rotate at a constant velocity,&lt;br /&gt;
although that&amp;#039;s not necessarily a bad thing&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Quat:aimZAxis(Vec3 p1, Vec3 p2)|aimZAxis]]([[Vec3]] p1, [[Vec3]] p2)&lt;br /&gt;
|set quat to have at vec along the p1, p2 line&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|Quat&lt;br /&gt;
|Quat * float&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Quat&lt;br /&gt;
|Quat * Quat&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Quat&lt;br /&gt;
|Quat + Quat&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Quat&lt;br /&gt;
|Quat - Quat&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|Quat == Quat&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>