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
+10 -10
View File
@@ -130,20 +130,20 @@ mod tests {
constant_pi: "pi" => (std::f64::consts::PI, Unit::BASE_UNIT),
constant_e: "e" => (std::f64::consts::E, Unit::BASE_UNIT),
constant_phi: "phi" => (1.61803398875, Unit::BASE_UNIT),
constant_tau: "tau" => (2.0 * std::f64::consts::PI, Unit::BASE_UNIT),
constant_tau: "tau" => (2. * std::f64::consts::PI, Unit::BASE_UNIT),
constant_infinity: "inf" => (f64::INFINITY, Unit::BASE_UNIT),
constant_infinity_symbol: "" => (f64::INFINITY, Unit::BASE_UNIT),
multiply_pi: "2 * pi" => (2.0 * std::f64::consts::PI, Unit::BASE_UNIT),
add_e_constant: "e + 1" => (std::f64::consts::E + 1.0, Unit::BASE_UNIT),
multiply_phi_constant: "phi * 2" => (1.61803398875 * 2.0, Unit::BASE_UNIT),
exponent_tau: "2^tau" => (2f64.powf(2.0 * std::f64::consts::PI), Unit::BASE_UNIT),
multiply_pi: "2 * pi" => (2. * std::f64::consts::PI, Unit::BASE_UNIT),
add_e_constant: "e + 1" => (std::f64::consts::E + 1., Unit::BASE_UNIT),
multiply_phi_constant: "phi * 2" => (1.61803398875 * 2., Unit::BASE_UNIT),
exponent_tau: "2^tau" => (2f64.powf(2. * std::f64::consts::PI), Unit::BASE_UNIT),
infinity_subtract_large_number: "inf - 1000" => (f64::INFINITY, Unit::BASE_UNIT),
// Trigonometric functions
trig_sin_pi: "sin(pi)" => (0.0, Unit::BASE_UNIT),
trig_cos_zero: "cos(0)" => (1.0, Unit::BASE_UNIT),
trig_tan_pi_div_four: "tan(pi/4)" => (1.0, Unit::BASE_UNIT),
trig_sin_tau: "sin(tau)" => (0.0, Unit::BASE_UNIT),
trig_cos_tau_div_two: "cos(tau/2)" => (-1.0, Unit::BASE_UNIT),
trig_sin_pi: "sin(pi)" => (0., Unit::BASE_UNIT),
trig_cos_zero: "cos(0)" => (1., Unit::BASE_UNIT),
trig_tan_pi_div_four: "tan(pi/4)" => (1., Unit::BASE_UNIT),
trig_sin_tau: "sin(tau)" => (0., Unit::BASE_UNIT),
trig_cos_tau_div_two: "cos(tau/2)" => (-1., Unit::BASE_UNIT),
}
}