Remove stray float literal .0 suffixes in lieu of just ending with a point (#4233)

Remove the .0 suffix on floats in lieu of just ending with a point
This commit is contained in:
Keavon Chambers
2026-06-12 19:47:36 -07:00
committed by GitHub
parent 2b8ef42086
commit cde8dd78e6
23 changed files with 125 additions and 125 deletions
+2 -2
View File
@@ -280,8 +280,8 @@ impl App {
let viewport_offset_y = y / window_size.height as f64;
render_state.set_viewport_offset([viewport_offset_x as f32, viewport_offset_y as f32]);
let viewport_scale_x = if width != 0.0 { window_size.width as f64 / width } else { 1.0 };
let viewport_scale_y = if height != 0.0 { window_size.height as f64 / height } else { 1.0 };
let viewport_scale_x = if width != 0. { window_size.width as f64 / width } else { 1. };
let viewport_scale_y = if height != 0. { window_size.height as f64 / height } else { 1. };
render_state.set_viewport_scale([viewport_scale_x as f32, viewport_scale_y as f32]);
}
}
+5 -5
View File
@@ -8,16 +8,16 @@ pub(crate) const SCROLL_LINE_HEIGHT: usize = 40;
pub(crate) const SCROLL_LINE_WIDTH: usize = 40;
#[cfg(target_os = "linux")]
pub(crate) const SCROLL_SPEED_X: f32 = 3.0;
pub(crate) const SCROLL_SPEED_X: f32 = 3.;
#[cfg(target_os = "linux")]
pub(crate) const SCROLL_SPEED_Y: f32 = 3.0;
pub(crate) const SCROLL_SPEED_Y: f32 = 3.;
#[cfg(not(target_os = "linux"))]
pub(crate) const SCROLL_SPEED_X: f32 = 1.0;
pub(crate) const SCROLL_SPEED_X: f32 = 1.;
#[cfg(not(target_os = "linux"))]
pub(crate) const SCROLL_SPEED_Y: f32 = 1.0;
pub(crate) const SCROLL_SPEED_Y: f32 = 1.;
pub(crate) const PINCH_ZOOM_SPEED: f64 = 300.0;
pub(crate) const PINCH_ZOOM_SPEED: f64 = 300.;
pub(crate) const MULTICLICK_TIMEOUT: Duration = Duration::from_millis(DOUBLE_CLICK_MILLISECONDS);
pub(crate) const MULTICLICK_ALLOWED_TRAVEL: usize = 4;
+2 -2
View File
@@ -174,8 +174,8 @@ impl RenderState {
sampler,
desired_width: size.width,
desired_height: size.height,
viewport_scale: [1.0, 1.0],
viewport_offset: [0.0, 0.0],
viewport_scale: [1., 1.],
viewport_offset: [0., 0.],
viewport_texture: None,
overlays_texture: None,
ui_texture: None,