15 releases
0.0.15 | Aug 18, 2024 |
---|---|
0.0.14 | Aug 1, 2024 |
0.0.11 | Jul 30, 2024 |
0.0.6 | Jun 10, 2024 |
0.0.3 | Feb 26, 2024 |
#210 in Embedded development
653 downloads per month
Used in 2 crates
39KB
1.5K
SLoC
Fixed32
Fixed32 is a Rust crate that provides a 32-bit fixed-point number type, designed for applications that require deterministic behavior and work with low precision and small ranges, such as games or embedded systems. This type is particularly useful in scenarios where floating-point arithmetic may introduce unwanted variability or overhead.
Overview
- Type:
Fp
- Precision: 16.16 fixed-point format
- Integer Range: -32768 to +32767
- Decimal Precision: The 16.16 fixed-point format provides approximately 4 decimal places of precision. If one unit represents a meter, this precision corresponds to about 0.1 millimeters.
Features
- Deterministic Arithmetic: Ensures consistent results across different platforms and runs.
- Low Overhead: Efficient fixed-point arithmetic suitable for performance-critical applications.
- Range Handling: Suitable for scenarios with small numerical ranges.
Installation
To use fixed32
in your Rust project, add it to your Cargo.toml
:
fixed32 = "0.0.15"
License
This project is licensed under the MIT License. See the LICENSE file for more details.