pub fn to_sample_slice<'a, T, S>(slice: T) -> &'a [S]where
S: Sample,
T: ToSampleSlice<'a, S>,Expand description
Converts the given slice into a slice of Samples.
This is a convenience function that wraps the ToSampleSlice trait.
ยงExamples
extern crate sample;
fn main() {
let foo = &[[0.0, 0.5], [0.0, -0.5]][..];
let bar = sample::slice::to_sample_slice(foo);
assert_eq!(bar, &[0.0, 0.5, 0.0, -0.5][..]);
}