Skip to content

Commit 1cc56fc

Browse files
committed
#97: Convert the hz method to take a Signal instead of an Iterator
1 parent 630ae54 commit 1cc56fc

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/signal.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,17 +1967,16 @@ where
19671967

19681968

19691969
impl Rate {
1970-
/// Create a `ConstHz` iterator which consistently yields "hz / rate".
1970+
/// Create a `ConstHz` signal which consistently yields `hz / rate`.
19711971
pub fn const_hz(self, hz: f64) -> ConstHz {
19721972
ConstHz { step: hz / self.hz }
19731973
}
19741974

1975-
/// Create a variable `hz` some iterator that yields hz and an initial hz.
1976-
///
1977-
/// The `Hz` iterator yields phase step sizes equal to "hz / rate".
1978-
pub fn hz<I>(self, init: f64, hz: I) -> Hz<I>
1975+
/// Create a `Hz` signal which yields phase step sizes controlled by an input
1976+
/// signal `hz`.
1977+
pub fn hz<S>(self, init: f64, hz: S) -> Hz<S>
19791978
where
1980-
I: Iterator<Item = f64>,
1979+
S: Signal<Frame = [f64; 1]>,
19811980
{
19821981
Hz {
19831982
hz: hz,

0 commit comments

Comments
 (0)