MCPcopy Create free account
hub / github.com/5ocworkshop/bgraph / sample

Method sample

examples/simple.rs:28–30  ·  view source on GitHub ↗
(&self, x: f32)

Source from the content-addressed store, hash-verified

26
27impl DataSource for SineWave {
28 fn sample(&self, x: f32) -> f32 {
29 (x * self.frequency * 2.0 * std::f32::consts::PI).sin()
30 }
31}
32
33fn main() -> Result<(), Box<dyn std::error::Error>> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected