Commit 53fa909
authored
[decimal] Update Decimal constructors (#33)
This pull request includes several changes to the `DeciMojo` library to
simplify the initialization of `Decimal` objects and improve code
readability.
Codebase Simplification:
* Removed the `from_words` method and replaced its usage with direct
calls to the `Decimal` constructor.
* Added a new constructor to initialize `Decimal` objects with four raw
words and another constructor to initialize `Decimal` objects with five
components.
Testing:
* Imported the `testing` module to add assertions for validating the
`flags` word in the new constructor.
* Updated test cases to use the new `Decimal` constructor instead of
`from_words`.1 parent c2c406e commit 53fa909
File tree
4 files changed
+178
-86
lines changed- docs
- src/decimojo
- tests
4 files changed
+178
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
File renamed without changes.
0 commit comments