https://github.com/applejag/firefly-go-math
Go game math library for Firefly Zero
https://github.com/applejag/firefly-go-math
firefly-zero gamedev go golang sdk
Last synced: 2 months ago
JSON representation
Go game math library for Firefly Zero
- Host: GitHub
- URL: https://github.com/applejag/firefly-go-math
- Owner: applejag
- License: mit
- Created: 2026-01-24T12:32:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-15T11:37:39.000Z (3 months ago)
- Last Synced: 2026-03-16T00:17:30.500Z (3 months ago)
- Topics: firefly-zero, gamedev, go, golang, sdk
- Language: Go
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Game math library for Firefly Go SDK
[](https://github.com/nuxy/no-ai-badge)
[](https://pkg.go.dev/github.com/applejag/firefly-go-math)
[](https://api.reuse.software/info/github.com/applejag/firefly-go-math)
Complementary library to [firefly-go](https://github.com/firefly-zero/firefly-go)
and [tinymath](https://github.com/orsinium-labs/tinymath)
containing math utilities not found in the other packages.
Contains tools like `ffrand`, a reimplementation of the Go [`math/rand`](https://pkg.go.dev/math/rand)
that is built upon the [`firefly.GetRandom()`](https://pkg.go.dev/github.com/firefly-zero/firefly-go/firefly#GetRandom)
function instead.
The `ffmath` package contains utility functions, and are using generics
extensively. Mostly as an experiment on generics usage, and because it's fun :)
I have compared the compiled output with non-generic variants to confirm
that the generic ones does not cause any regressions, even though they use
quirky hacks like `switch x := any(a).(type)`
## Installation
```bash
go get github.com/applejag/firefly-go-math
```
## License
This project conforms to the [REUSE](https://reuse.software/) standard.
Different parts of the code base use different licenses.
In general:
- Code: [MIT](./LICENSES/MIT.txt)
- Config files (e.g `go.mod`): [CC0-1.0](./LICENSES/CC0-1.0.txt)
- Docs: [CC-BY-4.0](./LICENSES/CC-BY-4.0.txt)