sintraworks/fraction
Fraction is a value type that represents the quotient of two numbers (like `1/3`), without loss of precision, and with support for basic arithmetic operations.
Using **Fractions** in your project
To use this package in a SwiftPM project, you need to set it up as a package dependency:
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(
url: "https://github.com/sintraworks/fraction.git",
.upToNextMinor(from: "0.9.0") // or `.upToNextMajor
)
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "Fractions", package: "fraction")
]
)
]
)Package Metadata
Repository: sintraworks/fraction
Default branch: main
README: README.md