1.0.2 • Published 6 months ago

@hazae41/fixed v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Fixed

Fixed-point numbers in idiomatic TypeScript

npm i @hazae41/fixed

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Usage

const eth = new Fixed(123n, 0) // 123n
const wei = fixed.move(18) // 123000000000000000000n

const wei2 = wei.add(new Fixed(1n, 18)) // 123000000000000000001n

const str = wei2.toString() // "123.000000000000000001"
1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago