Handbook
Glossary
translate-matrix ( matrix x y -- translated )
Vocabulary
ui
.
render
Inputs
matrix
an
object
x
an
object
y
an
object
Outputs
translated
an
object
Definition
USING:
arrays
kernel
math
sequences
specialized-arrays.instances.alien.c-types.float
;
IN:
ui.render
::
translate-matrix
( matrix x y -- translated )
x y
2array
float-array{
}
like
first2
:>
( tx ty ) matrix
clone
:>
translated 4
<iota>
[|
row |
row matrix
nth
tx
*
row 4
+
matrix
nth
ty
*
+
row 12
+
matrix
nth
+
row 12
+
translated
set-nth
]
each
translated
;