Handbook
Glossary
q>matrix4 ( q: float-4 -- matrix: matrix4 )
Vocabulary
math
.
matrices
.
simd
Inputs
q
a
float-4
Outputs
matrix
a
matrix4
Definition
USING:
generalizations
kernel
math
math.vectors
math.vectors.simd
sequences
typed
;
IN:
math.matrices.simd
TYPED::
q>matrix4
( q: float-4 -- matrix: matrix4 )
q
{
2 1 1 3
}
vshuffle
q
{
3 3 2 3
}
vshuffle
v*
:>
triangle-a q
{
0 0 0 3
}
vshuffle
q
{
1 2 3 3
}
vshuffle
v*
:>
triangle-b triangle-a
float-4{
2.0 2.0 2.0 0.0
}
v*
triangle-b
float-4{
-2.0 2.0 -2.0 0.0
}
v*
[
v-
]
[
v+
]
2bi
:>
( triangle-hi triangle-lo ) q q
v*
first4
{
[
[
+
]
[
-
]
[
-
]
tri*
]
[
[
-
]
[
+
]
[
-
]
tri*
]
[
[
-
]
[
-
]
[
+
]
tri*
]
}
4
ncleave
1.0
float-4-boa
:>
diagonal diagonal triangle-hi triangle-lo
(rotation-matrix4)
;