swift-fraction-number

main

Frizlab/swift-fraction-number

FractionNumber

This package provides a new type: FractionNumber that allows representing fractions precisely instead of using a Double or a Float.

Example of Usage

var fraction: FractionNumber = 1
print(fraction) // “1/1”

fraction /= 3
print(fraction) // “1/3”
print(fraction.doubleValue) // “0.3333333333333333”

...

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Oct 17 2024 17:54:52 GMT-0900 (Hawaii-Aleutian Daylight Time)