style(simulation): cargo fmt on the fix round + governance amendment typo (Hoshe nit)
This commit is contained in:
@@ -329,7 +329,10 @@ mod tests {
|
||||
// (32_768.0) must skip every octave and fall back to 0.0 (the
|
||||
// norm==0.0 empty-sum guard), same as the flat_envelope_invents_nothing
|
||||
// envelope==0 case but reached via the cutoff instead.
|
||||
assert_eq!(terrain_detail(5, 1_000.0, 2_000.0, 0.6, 0.5, 100_000.0), 0.0);
|
||||
assert_eq!(
|
||||
terrain_detail(5, 1_000.0, 2_000.0, 0.6, 0.5, 100_000.0),
|
||||
0.0
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -2044,8 +2044,7 @@ mod tests {
|
||||
for i in 0..20 {
|
||||
let wx = (100 + i * 37) as f64 * dm;
|
||||
let wy = (100 + i * 53) as f64 * dm;
|
||||
let uncut =
|
||||
derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 0.0);
|
||||
let uncut = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 0.0);
|
||||
let cut = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
|
||||
@@ -606,7 +606,9 @@ fn derive_window_cell(
|
||||
morphology: prof.morphology_zone as u8,
|
||||
elev_q: prof.elev_q.clamp(0, 100) as u8,
|
||||
temp_dc: match prof.temperature_c {
|
||||
Some(t) => ((t * 10.0).round() as i32).clamp(i16::MIN as i32 + 1, i16::MAX as i32) as i16,
|
||||
Some(t) => {
|
||||
((t * 10.0).round() as i32).clamp(i16::MIN as i32 + 1, i16::MAX as i32) as i16
|
||||
}
|
||||
None => REGION_TEMP_NONE_DC,
|
||||
},
|
||||
moisture_q: prof.moisture_q.clamp(0, 100) as u8,
|
||||
@@ -2301,7 +2303,13 @@ mod tests {
|
||||
if let GenCompletion::WindowDerived { body_id, layer } = c {
|
||||
if body_id == "BandBody" {
|
||||
window_cache.insert(
|
||||
(body_id, layer.center, layer.n, layer.granularity, layer.min_wl_m),
|
||||
(
|
||||
body_id,
|
||||
layer.center,
|
||||
layer.n,
|
||||
layer.granularity,
|
||||
layer.min_wl_m,
|
||||
),
|
||||
*layer,
|
||||
);
|
||||
}
|
||||
@@ -2345,7 +2353,10 @@ mod tests {
|
||||
let layer_b = resp_b.district_window.expect("req_b must hit the cache");
|
||||
assert_eq!(layer_a.min_wl_m, 4_096, "echo must be the QUANTIZED band");
|
||||
assert_eq!(layer_b.min_wl_m, 4_096, "echo must be the QUANTIZED band");
|
||||
assert_eq!(layer_a, layer_b, "both requests must resolve to the identical cached layer");
|
||||
assert_eq!(
|
||||
layer_a, layer_b,
|
||||
"both requests must resolve to the identical cached layer"
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
@@ -2502,7 +2513,13 @@ mod tests {
|
||||
if let GenCompletion::WindowDerived { body_id, layer } = c {
|
||||
if body_id == "SmallMoon" {
|
||||
window_cache.insert(
|
||||
(body_id, layer.center, layer.n, layer.granularity, layer.min_wl_m),
|
||||
(
|
||||
body_id,
|
||||
layer.center,
|
||||
layer.n,
|
||||
layer.granularity,
|
||||
layer.min_wl_m,
|
||||
),
|
||||
*layer,
|
||||
);
|
||||
}
|
||||
@@ -2650,7 +2667,13 @@ mod tests {
|
||||
if let GenCompletion::WindowDerived { body_id, layer } = c {
|
||||
if body_id == "AliasBody" {
|
||||
window_cache.insert(
|
||||
(body_id, layer.center, layer.n, layer.granularity, layer.min_wl_m),
|
||||
(
|
||||
body_id,
|
||||
layer.center,
|
||||
layer.n,
|
||||
layer.granularity,
|
||||
layer.min_wl_m,
|
||||
),
|
||||
*layer,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -414,7 +414,13 @@ fn drain_generation_completions(
|
||||
// `handle_atlas_request`'s window branch, which finds this
|
||||
// entry via `DistrictWindowCache::get` and serves it.
|
||||
window_cache.insert(
|
||||
(body_id, layer.center, layer.n, layer.granularity, layer.min_wl_m),
|
||||
(
|
||||
body_id,
|
||||
layer.center,
|
||||
layer.n,
|
||||
layer.granularity,
|
||||
layer.min_wl_m,
|
||||
),
|
||||
*layer,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user