-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces the `UnitsConverter`, a `struct` that wraps three distinct types of unit converters: 1. **ProportionalConverter**: Handles conversions between units where the relationship is `unit1 = CR * unit2`. 2. **ReciprocalConverter**: Handles conversions between units where the relationship is `unit1 = 1 / (CR * unit2)`. 3. **OffsetConverter**: Handles conversions with an offset, following the formula `unit1 = CR * unit2 + Offset`. _Note: CR refers to the Conversion Rate._ Additionally, this PR includes an organizational change: - The `ConverterFactory` has been relocated to a separate folder, enhancing the overall clarity and structure of the implementation. Fixes: #4576
- Loading branch information
Showing
4 changed files
with
413 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.