Open-Systems-Pharmacology / OSPSuite.Core

Core functionalities of the Open Systems Pharmacology Suite
Other
5 stars 8 forks source link

Modified the CompareDoubleValues method to format in consistent units #2350

Closed peterdew closed 2 weeks ago

peterdew commented 2 weeks ago

Fixes #2349

Description

When comparing numeric values with units, values are sometimes displayed in different units (e.g., one in dm and one in cm). This makes it difficult for users to properly interpret the differences. Solution Modified the CompareDoubleValues method to always use the unit of the first object for displaying both values. This ensures differences are consistently displayed in the same unit. This change only affects the display of differences, not the underlying comparison logic or conversions.

Type of change

Please mark relevant options with an x in the brackets.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

Screenshots (if appropriate):

Questions (if appropriate):