Skip to content

Commit

Permalink
Update to version 0.1.72 [skip-ci]
Browse files Browse the repository at this point in the history
Files changed:
M	pyproject.toml
M	setup.py
M	unitsnet_py/units/density.py
  • Loading branch information
haimkastner committed Dec 7, 2023
1 parent 94435c9 commit db1457b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "unitsnet_py"
version = "0.1.71"
version = "0.1.72"
description = "A better way to hold unit variables and easily convert to the destination unit"
repository = "https://github.com/haimkastner/unitsnet-py"
authors = ["Haim Kastner <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup_kwargs = {
'name': 'unitsnet-py',
'version': '0.1.71',
'version': '0.1.72',
'license': 'MIT',
'keywords': 'conversion, units-of-measure, units, quantities, unit-converter, converter, unit, measure, measures, measurement, measurements',
'description': 'A better way to hold unit variables and easily convert to the destination unit',
Expand Down
8 changes: 4 additions & 4 deletions unitsnet_py/units/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def __convert_from_base(self, from_unit: DensityUnits) -> float:
return (value * 0.062427961)

if from_unit == DensityUnits.PoundPerCubicYard:
return (value * (0.45359237 / 0.9144 / 0.9144 / 0.9144))
return (value / (0.45359237 / 0.9144 / 0.9144 / 0.9144))

if from_unit == DensityUnits.TonnePerCubicMillimeter:
return (value * 1e-12)
Expand Down Expand Up @@ -528,7 +528,7 @@ def __convert_from_base(self, from_unit: DensityUnits) -> float:
return ((value * 0.062427961) / 1000.0)

if from_unit == DensityUnits.KilopoundPerCubicYard:
return ((value * (0.45359237 / 0.9144 / 0.9144 / 0.9144)) / 1000.0)
return ((value / (0.45359237 / 0.9144 / 0.9144 / 0.9144)) / 1000.0)

if from_unit == DensityUnits.FemtogramPerLiter:
return ((value * 1) / 1e-15)
Expand Down Expand Up @@ -614,7 +614,7 @@ def __convert_to_base(self, value: float, to_unit: DensityUnits) -> float:
return (value / 0.062427961)

if to_unit == DensityUnits.PoundPerCubicYard:
return (value / (0.45359237 / 0.9144 / 0.9144 / 0.9144))
return (value * (0.45359237 / 0.9144 / 0.9144 / 0.9144))

if to_unit == DensityUnits.TonnePerCubicMillimeter:
return (value / 1e-12)
Expand Down Expand Up @@ -701,7 +701,7 @@ def __convert_to_base(self, value: float, to_unit: DensityUnits) -> float:
return ((value / 0.062427961) * 1000.0)

if to_unit == DensityUnits.KilopoundPerCubicYard:
return ((value / (0.45359237 / 0.9144 / 0.9144 / 0.9144)) * 1000.0)
return ((value * (0.45359237 / 0.9144 / 0.9144 / 0.9144)) * 1000.0)

if to_unit == DensityUnits.FemtogramPerLiter:
return ((value / 1) * 1e-15)
Expand Down

0 comments on commit db1457b

Please sign in to comment.