Bring the whole workspace into compliance with the repo's rustfmt config (edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted across many crates. Pure formatting — no logic changes; `cargo fmt --check` is now clean and `cargo build --workspace` is green.
10 lines
339 B
Rust
10 lines
339 B
Rust
use lawsynth_core::Identifier;
|
|
use lawsynth_world::{Event, EventDirection, crosses_zero};
|
|
|
|
fn main() {
|
|
let event =
|
|
Event::new(Identifier::new("threshold").unwrap(), 1.25, EventDirection::Rising).unwrap();
|
|
assert!(crosses_zero(-0.1, 0.2, event.direction));
|
|
println!("event {} occurred at t={}", event.id, event.time);
|
|
}
|