Merge pull request #953 from mhilbrunner/docs-transforms

Small fixes for transforms docs, closes #236
This commit is contained in:
Rémi Verschelde
2018-01-05 21:21:20 +01:00
committed by GitHub
@@ -91,7 +91,7 @@ the point:
::
var final_pos = x.dot(new_pos) + y.dot(new_pos)
var final_pos = Vector2(x.dot(new_pos), y.dot(new_pos))
Then what we have is.. wait a minute, it's the ship in its design
position!
@@ -220,7 +220,7 @@ method:
# Move 2 units towards where the basis is oriented
var m = Matrix32()
m = m.rotated(PI/2) # rotate 90°
m=m.translated( Vector2(2,0) )
m = m.translated( Vector2(2,0) )
.. image:: img/tutomat14.png
@@ -378,7 +378,7 @@ Because in matrix math, A * B is not the same as B * A.
Multiplication by inverse
-------------------------
Multiplying a matrix by its inverse, results in identity
Multiplying a matrix by its inverse, results in identity:
::
@@ -498,4 +498,4 @@ An example:
var t = Transform()
pos = t.xform(pos) # transform 3D position
pos = t.basis.xform(pos) # (only rotate)
pos = t.origin + pos (only translate)
pos = t.origin + pos # (only translate)