Skip to content

Commit 5bdb309

Browse files
committed
chore: update readme [skip ci]
1 parent fdb941d commit 5bdb309

2 files changed

Lines changed: 37 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.vs/
2+
.codex

README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Ideal for simulations, games, and physics engines requiring reliable arithmetic
2424
- **Bounding Shapes:** Includes `IBound` structs `BoundingBox`, `BoundingSphere`, and `BoundingArea` for lightweight spatial calculations.
2525
- **Advanced Math Functions:** Includes trigonometry and common math utilities.
2626
- **Framework Agnostic:** Works with **.NET, Unity, and other game engines**.
27-
- **Full Serialization Support:** Out-of-the-box round-trip serialization via `MemoryPack` across all serializable structs, with `System.Text.Json` constructor support on .NET 8+.
27+
- **Flexible Serialization Options:** The default build includes out-of-the-box `MemoryPack` support across serializable structs, and a `NoMemoryPack` variant is available for projects that need to avoid the MemoryPack dependency.
2828

2929
---
3030

@@ -34,33 +34,63 @@ Clone the repository and add it to your project:
3434

3535
### Non-Unity Projects
3636

37-
1. **Install via NuGet**:
38-
- Add FixedMathSharp to your project using the following command:
37+
1. **Choose the package that fits your runtime**:
38+
- Use `FixedMathSharp` if you want the standard package with built-in `MemoryPack` support.
39+
- Use `FixedMathSharp.NoMemoryPack` if you want the same math library without the `MemoryPack` dependency, such as when integrating with toolchains that do better without MemoryPack-generated code.
40+
41+
2. **Install via NuGet**:
42+
- Standard package:
3943

4044
```bash
4145
dotnet add package FixedMathSharp
4246
```
4347

48+
- No-MemoryPack package:
49+
50+
```bash
51+
dotnet add package FixedMathSharp.NoMemoryPack
52+
```
53+
4454
- If you're using `FluentAssertions` in your test project, the companion assertions package is available here:
4555
[FixedMathSharp.FluentAssertions](https://www.nuget.org/packages/FixedMathSharp.FluentAssertions)
4656
47-
2. **Or Download/Clone**:
57+
3. **Or Download/Clone**:
4858
- Clone the repository or download the source code.
4959
5060
```bash
5161
git clone https://github.com/mrdav30/FixedMathSharp.git
5262
```
5363
54-
3. **Add to Project**:
64+
4. **Add to Project**:
5565
5666
- Include the FixedMathSharp project or its DLLs in your build process.
5767
68+
### Package Variants
69+
70+
FixedMathSharp is published in two build variants so you can choose between convenience and maximum compatibility:
71+
72+
- `FixedMathSharp`
73+
Includes `MemoryPack` and its generated serialization support. This is the best default choice for most .NET applications.
74+
- `FixedMathSharp.NoMemoryPack`
75+
Excludes the `MemoryPack` package and uses internal shim attributes so the same source can compile without the dependency. Choose this when you do not need built-in MemoryPack serialization, when you prefer to use a different serializer, or when your target environment is sensitive to MemoryPack-generated code paths.
76+
77+
Both variants expose the same core fixed-point math API. The main difference is whether `MemoryPack` is part of the package and serialization surface.
78+
79+
If you build from source, the repository also provides matching release configurations:
80+
81+
- `Release` builds the standard `FixedMathSharp` package and archives.
82+
- `ReleaseNoMemoryPack` builds the `FixedMathSharp.NoMemoryPack` package and archives.
83+
84+
If you use Unity Burst AOT, prefer the `NoMemoryPack` build. `MemoryPack`'s Unity support is centered on IL2CPP via its .NET Source Generator path, so the no-MemoryPack variant is the safer choice for Burst AOT scenarios.
85+
5886
### Unity Integration
5987

60-
FixedMathSharp is now maintained as a separate Unity package.For Unity-specific implementations, refer to:
88+
FixedMathSharp is now maintained as a separate Unity package. For Unity-specific implementations, refer to:
6189

6290
🔗 [FixedMathSharp-Unity Repository](https://github.com/mrdav30/FixedMathSharp-Unity).
6391

92+
If you are evaluating the .NET package directly for Unity-adjacent tooling, the `NoMemoryPack` variant is the safer starting point when you want to avoid the MemoryPack dependency entirely. In particular, if you use Burst AOT, prefer `FixedMathSharp.NoMemoryPack`.
93+
6494
---
6595

6696
## 📖 Usage Examples

0 commit comments

Comments
 (0)