-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meld @liquity/decimal into @liquity/lib-base
It'll make the release process simpler. It's doubtful that anyone would want to use Decimal outside of the Liquity SDK anyway.
- Loading branch information
1 parent
8459cdf
commit dbf1afd
Showing
210 changed files
with
462 additions
and
559 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
2 changes: 1 addition & 1 deletion
2
docs/sdk/decimal.decimal.finite.md → docs/sdk/lib-base.decimal.finite.md
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
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
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
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
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
2 changes: 1 addition & 1 deletion
2
docs/sdk/decimal.decimal.half.md → docs/sdk/lib-base.decimal.half.md
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
2 changes: 1 addition & 1 deletion
2
docs/sdk/decimal.decimal.infinite.md → docs/sdk/lib-base.decimal.infinite.md
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
2 changes: 1 addition & 1 deletion
2
docs/sdk/decimal.decimal.infinity.md → docs/sdk/lib-base.decimal.infinity.md
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
2 changes: 1 addition & 1 deletion
2
docs/sdk/decimal.decimal.iszero.md → docs/sdk/lib-base.decimal.iszero.md
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@liquity/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) | ||
|
||
## Decimal class | ||
|
||
Fixed-point decimal bignumber with 18 digits of precision. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class Decimal | ||
``` | ||
|
||
## Remarks | ||
|
||
Used by Liquity libraries to precisely represent native currency (e.g. Ether), LUSD and LQTY amounts, as well as derived metrics like collateral ratios. | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [finite](./lib-base.decimal.finite.md) | | this \| undefined | | | ||
| [HALF](./lib-base.decimal.half.md) | <code>static</code> | [Decimal](./lib-base.decimal.md) | | | ||
| [infinite](./lib-base.decimal.infinite.md) | | this \| undefined | | | ||
| [INFINITY](./lib-base.decimal.infinity.md) | <code>static</code> | [Decimal](./lib-base.decimal.md) | | | ||
| [isZero](./lib-base.decimal.iszero.md) | | boolean | | | ||
| [nonZero](./lib-base.decimal.nonzero.md) | | this \| undefined | | | ||
| [ONE](./lib-base.decimal.one.md) | <code>static</code> | [Decimal](./lib-base.decimal.md) | | | ||
| [zero](./lib-base.decimal.zero.md) | | this \| undefined | | | ||
| [ZERO](./lib-base.decimal.zero.md) | <code>static</code> | [Decimal](./lib-base.decimal.md) | | | ||
|
||
## Methods | ||
|
||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [add(addend)](./lib-base.decimal.add.md) | | | | ||
| [div(divider)](./lib-base.decimal.div.md) | | | | ||
| [eq(that)](./lib-base.decimal.eq.md) | | | | ||
| [from(decimalish)](./lib-base.decimal.from.md) | <code>static</code> | | | ||
| [fromBigNumberString(bigNumberString)](./lib-base.decimal.frombignumberstring.md) | <code>static</code> | | | ||
| [gt(that)](./lib-base.decimal.gt.md) | | | | ||
| [gte(that)](./lib-base.decimal.gte.md) | | | | ||
| [lt(that)](./lib-base.decimal.lt.md) | | | | ||
| [lte(that)](./lib-base.decimal.lte.md) | | | | ||
| [max(a, b)](./lib-base.decimal.max.md) | <code>static</code> | | | ||
| [min(a, b)](./lib-base.decimal.min.md) | <code>static</code> | | | ||
| [mul(multiplier)](./lib-base.decimal.mul.md) | | | | ||
| [mulDiv(multiplier, divider)](./lib-base.decimal.muldiv.md) | | | | ||
| [pow(exponent)](./lib-base.decimal.pow.md) | | | | ||
| [prettify(precision)](./lib-base.decimal.prettify.md) | | | | ||
| [shorten()](./lib-base.decimal.shorten.md) | | | | ||
| [sub(subtrahend)](./lib-base.decimal.sub.md) | | | | ||
| [toString(precision)](./lib-base.decimal.tostring.md) | | | | ||
|
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.