lightning-distance 0.2.0

Estimate how far away lightning is from the flash-to-thunder delay, plus the 30-second safety rule.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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.

```rust
use lightning_distance::{miles, is_dangerous};
let dist = miles(10.0);          // ~2 miles
let danger = is_dangerous(10.0); // true (<=30s)
```

License: MIT