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 committed Oct 23, 2024
1 parent fe7d5e3 commit 114fd24
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 @@ -56,7 +56,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 114fd24

Please sign in to comment.