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
@@ -228,10 +228,10 @@ pub fn text_width(text: &str, font_size: f64) -> f64 {
let typesetting = TypesettingConfig {
font_size,
line_height_ratio: 1.2,
character_spacing: 0.0,
character_spacing: 0.,
max_width: None,
max_height: None,
tilt: 0.0,
tilt: 0.,
align: TextAlign::AlignLeft,
};
@@ -1215,7 +1215,7 @@ impl OverlayContextInternal {
fn snap_to_physical_pixel(&self, p: DVec2) -> DVec2 {
let s = self.viewport.scale();
if !s.is_finite() || s <= 0.0 {
if !s.is_finite() || s <= 0. {
return p.round();
}
(p * s).round() / s
@@ -1223,7 +1223,7 @@ impl OverlayContextInternal {
fn snap_to_physical_pixel_center(&self, p: DVec2) -> DVec2 {
let s = self.viewport.scale();
if !s.is_finite() || s <= 0.0 {
if !s.is_finite() || s <= 0. {
return p.round() - DVec2::splat(0.5);
}
self.snap_to_physical_pixel(p) - DVec2::splat(0.5 / s)