Handbook
Glossary
float-map>byte-map ( floats: float-array scale: float bias: float -- bytes: byte-array )
Vocabulary
noise
Inputs
floats
a
float-array
scale
a
float
bias
a
float
Outputs
bytes
a
byte-array
Definition
USING:
alien.data.map.private
generalizations
kernel
math
math.vectors
math.vectors.conversion
math.vectors.simd
;
IN:
noise
:
float-map>byte-map
( floats: float-array scale: float bias: float -- bytes: byte-array )
[
[
255.0
*
v*n
]
curry
]
dip
[
255.0
*
v+n
float-4
int-4
vconvert
]
curry
compose
[
4
napply
[
int-4
short-8
vconvert
]
2bi@
short-8
uchar-16
vconvert
]
curry
{
{
float-4
4
}
}
{
uchar-16
}
data-map
;
inline