ModulusOperandi
Declarative, multi-mode modular arithmetic for Swift Integers and Floating-Point types.
[[ Optionally, a longer description of this package. ]]

Features
- [x] Declarative API that allows choosing between Euclidean, Truncating, or Flooring Modular Arithmetic.
- [x] Support for conformances to
BinaryIntegerandFloatingPointInteger.
Installation
Xcode Projects
Select File -> Swift Packages -> Add Package Dependency and enter https://github.com/CypherPoet/ModulusOperandi.
Swift Package Manager Projects
You can add ModulusOperandi as a dependency in your Package.swift file:
let package = Package(
//...
dependencies: [
.package(url: "https://github.com/CypherPoet/ModulusOperandi", from: "0.1.0"),
],
//...
)
Then simply import ModulusOperandi wherever you’d like to use it.
Usage
Roadmap
- World Domination
Contributing
Contributions to ModulusOperandi are most welcome. Check out some of the issue templates for more info.
Developing
Requirements
- Xcode 12.0+ (for developing)
Generating Documentation
Documentation is generated by Jazzy. Installation instructions can be found here, and as soon as you have it set up, docs can be generated simply by running jazzy from the command line.
License
ModulusOperandi is available under the MIT license. See the LICENSE file for more info.
View on GitHub
Reference