https://github.com/influenceth/cairo-rand-64x61
A psuedrandom and procedural generation library using 64.61 fixed point math for Cairo
https://github.com/influenceth/cairo-rand-64x61
cairo procedural-generation pseudorandom starknet
Last synced: 7 months ago
JSON representation
A psuedrandom and procedural generation library using 64.61 fixed point math for Cairo
- Host: GitHub
- URL: https://github.com/influenceth/cairo-rand-64x61
- Owner: influenceth
- License: mit
- Created: 2022-07-29T00:45:30.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-21T13:31:54.000Z (over 3 years ago)
- Last Synced: 2025-11-28T01:46:43.739Z (7 months ago)
- Topics: cairo, procedural-generation, pseudorandom, starknet
- Language: Python
- Homepage:
- Size: 188 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/py/cairo_rand_64x61)
# Cairo Rand 64x61
A psuedrandom and procedural generation library using 64.61 fixed point math for Cairo
## Usage ##
Install with `pip install cairo_rand_64x61` and import and use with `from cairo_rand_64x61.simplex import Simplex`.
## Signed 64.61 Fixed Point Numbers ##
This library is heavily dependend on 64.61 bit fixed point numbers. See https://github.com/influenceth/cairo-math-64x61 for more information.
## Simplex Library ##
`Simplex` includes an implementation of a three-dimensional simplex noise based on the GLSL implementation found here: https://github.com/ashima/webgl-noise/blob/master/src/noise3D.glsl. It is tested against output of the GLSL library. Keep in mind that in many cases the GLSL implementation will be run on GPUs using medium precision which will lead to errors with large input values for `x, y, z`. This cairo library does *NOT* attempt to mimic this error (this error will also disappear if using high precision on GPU).
## Extensibility ##
This library strives to adhere to the OpenZeppelin extensibility pattern: https://docs.openzeppelin.com/contracts-cairo/0.2.1/extensibility#libraries