File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!--
2+ SPDX-FileCopyrightText: 2026 Kalle Fagerberg
3+
4+ SPDX-License-Identifier: CC-BY-4.0
5+ -->
6+
17# Game math library for Firefly Go SDK
28
9+ [ ![ NO AI] ( https://raw.githubusercontent.com/nuxy/no-ai-badge/master/badge.svg )] ( https://github.com/nuxy/no-ai-badge )
10+ [ ![ REUSE status] ( https://api.reuse.software/badge/github.com/applejag/firefly-go-math )] ( https://api.reuse.software/info/github.com/applejag/firefly-go-math )
11+
312Complementary library to [ firefly-go] ( https://github.com/firefly-zero/firefly-go )
413and [ tinymath] ( https://github.com/orsinium-labs/tinymath )
514containing math utilities not found in the other packages.
615
716Contains tools like ` ffrand ` , a reimplementation of the Go [ ` math/rand ` ] ( https://pkg.go.dev/math/rand )
817that is built upon the [ ` firefly.GetRandom() ` ] ( https://pkg.go.dev/github.com/firefly-zero/firefly-go/firefly#GetRandom )
918function instead.
19+
20+ The ` ffmath ` package contains utility functions, and are using generics
21+ extensively. Mostly as an experiment on generics usage, and because it's fun :)
22+ I have compared the compiled output with non-generic variants to confirm
23+ that the generic ones does not cause any regressions, even though they use
24+ quirky hacks like ` switch x := any(a).(type) `
25+
26+ ## License
27+
28+ This project conforms to the [ REUSE] ( https://reuse.software/ ) standard.
29+ Different parts of the code base use different licenses.
30+
31+ In general:
32+
33+ - Code: [ MIT] ( ./LICENSES/MIT.txt )
34+ - Config files (e.g ` go.mod ` ): [ CC0-1.0] ( ./LICENSES/CC0-1.0.txt )
35+ - Docs: [ CC-BY-4.0] ( ./LICENSES/CC-BY-4.0.txt )
You can’t perform that action at this time.
0 commit comments