https://github.com/orchetect/swift-unit-interval
UnitInterval and SignedUnitInterval types for Swift
https://github.com/orchetect/swift-unit-interval
floating-point number swift unit-interval
Last synced: 3 days ago
JSON representation
UnitInterval and SignedUnitInterval types for Swift
- Host: GitHub
- URL: https://github.com/orchetect/swift-unit-interval
- Owner: orchetect
- License: mit
- Created: 2026-07-14T18:30:28.000Z (16 days ago)
- Default Branch: main
- Last Pushed: 2026-07-14T19:16:04.000Z (16 days ago)
- Last Synced: 2026-07-14T20:27:26.901Z (16 days ago)
- Topics: floating-point, number, swift, unit-interval
- Language: Swift
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SwiftUnitInterval
[](https://swiftpackageindex.com/orchetect/swift-unit-interval) [](https://swiftpackageindex.com/orchetect/swift-unit-interval) [](https://github.com/orchetect/swift-unit-interval/blob/main/LICENSE)
Provides `UnitInterval` and `SignedUnitInterval` types for Swift.
These types are designed to work with floating-point unit interval values (`0.0 ... 1.0`) and their signed counterpart (`-1.0 ... 1.0`).
## Getting Started
This library is available as a Swift Package Manager (SPM) package.
1. Add the **swift-unit-interval** repo as a dependency.
```swift
.package(url: "https://github.com/orchetect/swift-unit-interval", from: "1.0.0")
```
2. Add **SwiftUnitInterval** to your target.
```swift
.product(name: "SwiftUnitInterval", package: "swift-unit-interval")
```
3. Import **SwiftUnitInterval** to use it.
```swift
import SwiftUnitInterval
```
## Documentation
See the [online documentation](https://swiftpackageindex.com/orchetect/swift-unit-interval/documentation) for library usage
## Author
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself [@orchetect](https://github.com/orchetect).
## License
Licensed under the MIT license. See [LICENSE](https://github.com/orchetect/swift-unit-interval/blob/main/LICENSE) for details.
## Sponsoring
If you enjoy using this library and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.
## Community & Support
Please do not email maintainers for technical support. Several options are available for issues and questions:
- Questions and feature ideas can be posted to [Discussions](https://github.com/orchetect/swift-unit-interval/discussions).
- If an issue is a verifiable bug with reproducible steps it may be posted in [Issues](https://github.com/orchetect/swift-unit-interval/issues).
## Contributions
Contributions are welcome. Posting in [Discussions](https://github.com/orchetect/swift-unit-interval/discussions) first prior to new submitting PRs for features or modifications is encouraged.
## Code Quality & AI Contribution Policy
In an effort to maintain a consistent level of code quality and safety, this repository was built by hand and is maintained without the use of AI code generation.
AI-assisted contributions are welcome, but must remain modest in scope, maintain the same degree of quality and care, and be thoroughly vetted before acceptance.