From db1457b302cfe7f524447652411b419942c5240a Mon Sep 17 00:00:00 2001 From: haimkastner Date: Thu, 7 Dec 2023 07:48:02 +0000 Subject: [PATCH] Update to version 0.1.72 [skip-ci] Files changed: M pyproject.toml M setup.py M unitsnet_py/units/density.py --- pyproject.toml | 2 +- setup.py | 2 +- unitsnet_py/units/density.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9e96ab9..f18ca7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] diff --git a/setup.py b/setup.py index da926a9..820e301 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/unitsnet_py/units/density.py b/unitsnet_py/units/density.py index 4c5e0ad..c0f9d3d 100644 --- a/unitsnet_py/units/density.py +++ b/unitsnet_py/units/density.py @@ -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) @@ -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) @@ -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) @@ -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)