https://github.com/pontem-network/uq64x64
UQ64x64
https://github.com/pontem-network/uq64x64
Last synced: about 2 months ago
JSON representation
UQ64x64
- Host: GitHub
- URL: https://github.com/pontem-network/uq64x64
- Owner: pontem-network
- Created: 2022-07-13T15:45:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-05T21:05:46.000Z (about 1 year ago)
- Last Synced: 2025-02-05T20:07:50.203Z (3 months ago)
- Language: Move
- Size: 16.6 KB
- Stars: 3
- Watchers: 7
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## UQ64x64
Implements fixed point numbers in Move language using the Q number format.
Similar one used in [Uniswap](https://github.com/Uniswap/v2-core/blob/master/contracts/libraries/UQ112x112.sol) v2 core.
## Compile
aptos move compile
## Test
aptos move test
## Add as dependency
Add to `Move.toml`:
```toml
[dependencies.UQ64x64]
git = "https://github.com/pontem-network/UQ64x64.git"
rev = "v0.3.8"
```And then use in code:
```move
use uq64x64::uq64x64;
...
let uq = uq64x64::encode(10);
```## LICENSE
MIT.