Skip to content

Commit

Permalink
Fix inaccuracies introduced with truncation
Browse files Browse the repository at this point in the history
  • Loading branch information
Neal Chambers authored and macanudo527 committed Oct 29, 2024
1 parent f7cfc21 commit 93d2c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/variant_units/option_value_namer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def option_value_value_unit
def option_value_value_unit_scaled
unit_scale, unit_name = scale_for_unit_value

value = (@nameable.unit_value / unit_scale).to_d.truncate(2)
value = (@nameable.unit_value / unit_scale).to_d.round(2)

[value, unit_name]
end
Expand Down

0 comments on commit 93d2c7e

Please sign in to comment.