Skip to content

Commit 53fa909

Browse files
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

4 files changed

+178
-86
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A fixed-point decimal arithmetic library implemented in [the Mojo programming language 🔥](https://www.modular.com/mojo).
44

5-
**[中文·漢字»](https://github.com/forFudan/DeciMojo/blob/main/docs/README_ZH.md)**
5+
**[中文·漢字»](./docs/readme_zht)**
66

77
## Overview
88

File renamed without changes.

0 commit comments

Comments
 (0)