Skip to content

Commit

Permalink
chore: fix i32 to f64 conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
pnwatin committed Sep 29, 2023
1 parent adf6223 commit 85f1654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/get_las_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use uuid::Uuid;

fn find_smallest_scale(x: f64) -> f64 {
let mut scale = 0.001;
let min_i32 = i32::MIN as f64;
let max_i32 = i32::MAX as f64;
let min_i32 = f64::from(i32::MIN);
let max_i32 = f64::from(i32::MAX);

while (x / scale).round() < min_i32 || (x / scale).round() > max_i32 {
scale += 0.0001;
Expand Down

0 comments on commit 85f1654

Please sign in to comment.