Handbook
Glossary
<translation-matrix4> ( offset -- matrix )
Extra matrix operations
Prev:
<skew-matrix4> ( theta -- matrix )
Next:
<random-integer-matrix> ( m n max -- matrix )
Vocabulary
math
.
matrices
.
extras
Inputs
offset
an
object
Outputs
matrix
an
object
Definition
USING:
sequences
;
IN:
math.matrices.extras
::
<translation-matrix4>
( offset -- matrix )
offset
first3
:>
( x y z )
{
{
1.0 0.0 0.0 x
}
{
0.0 1.0 0.0 y
}
{
0.0 0.0 1.0 z
}
{
0.0 0.0 0.0 1.0
}
}
;