8000 GitHub - hazae41/fixed: Fixed-point numbers in idiomatic TypeScript
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hazae41/fixed

Repository files navigation

Fixed

Fixed-point numbers in idiomatic TypeScript

npm i @hazae41/fixed

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Usage

645D
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"

About

Fixed-point numbers in idiomatic TypeScript

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published
0