Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
hanning ( n -- seq )
Vocabulary
math.extras
Inputs and outputs
n
an
integer
seq
a
sequence
Word description
Return the Hanning window.
Definition
USING:
arrays
kernel
math
math.functions
sequences
;
IN:
math.extras
:
hanning
( n -- seq )
dup
1
<=
[
1
=
[
1
1array
]
[
{
}
]
if
]
[
[0,2pi]
[
cos
-0.5
*
0.5
+
]
map!
]
if
;