# lightning-distance
Estimate how far away lightning is from the flash-to-thunder delay, plus the standard
30-second safety rule. Pure Rust, no deps.
Sound takes roughly 5 seconds to travel one mile (3 seconds per kilometer), so divide
the count by 5 for miles or 3 for kilometers. If the gap is 30 seconds or less, the
storm is close enough to be dangerous — go inside and wait 30 minutes after the last thunder.
The same math behind the [EarlyThunder](https://earlythunder.com/) storm tracker.
```rust
use lightning_distance::{miles, is_dangerous};
let dist = miles(10.0); // ~2 miles
let danger = is_dangerous(10.0); // true (<=30s)
```
License: MIT