Skip to content

Commit

Permalink
Fix null position values in extra modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Not-A-Normal-Robot committed May 15, 2024
1 parent 53f1734 commit 2d76940
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ fn main() {
{
let modes = &map["modes"];
let mut offset: f64 = std::f64::NEG_INFINITY;
for mode in modes.members() {
for (_, mode) in modes.entries() {
let y = mode["y"].as_f64().unwrap();
offset = offset.max(y);
}
offset = offset + 200.0;
offset += 200.0;

let extra_modes = get_extra_modes_json();

Expand All @@ -92,7 +92,7 @@ fn main() {

const PADDING: f64 = 30.0;

for mode in modes.members() {
for (_, mode) in modes.entries() {
let x = mode["x"].as_f64().unwrap();
let y = mode["y"].as_f64().unwrap();
let r = mode["size"].as_f64().unwrap();
Expand Down

0 comments on commit 2d76940

Please sign in to comment.