GitShow/sindresorhus/Percentage
sindresorhus

Percentage

A percentage type for Swift

by sindresorhus
numberpercentpercentageswift-packagetypetype-safety
Star on GitHubFork

Swift

280 stars25 forks5 contributorsQuiet · 6mo agoSince 2019v3.0.0MIT

Meet the team

See all 5 on GitHub →
sindresorhus
sindresorhus30 contributions
alexbinary
alexbinary1 contribution
magauran
magauran1 contribution
EvanHahn
EvanHahn1 contribution
irisdelaluna
irisdelaluna1 contribution

Languages

View on GitHub →
Swift100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
sindresorhus
Add overloads for Swift and Cocoa APIs?ClosedIssue

Would be nice to be able to use this with Swift/Cocoa APIs that accept a fraction . For example: https://developer.apple.com/documentation/uikit/uicolor/1621922-withalphacomponent https://developer.apple.com/documentation/appkit/nscolor/1526906-withalphacomponent https://developer.apple.com/documentation/swiftui/color/3049763-opacity https://developer.apple.com/documentation/swiftui/hstack/3269261-opacity https://developer.apple.com/documentation/swiftui/hstack/3269155-brightness https://developer.apple.com/documentation/swiftui/hstack/3269164-contrast https://developer.apple.com/documentation/swiftui/hstack/3269293-saturation https://developer.apple.com/documentation/swiftui/hstack/3269207-grayscale Does this make sense?

sindresorhus · 6mo ago
sindresorhus
FeedbackClosedIssue

Is this a good idea? Any downsides with such a type? Would it make sense to propose adding this kind of type to Swift itself?

sindresorhus · 6mo ago
sindresorhus
Conform to `BinaryFloatingPoint` instead of `Numeric`ClosedIssue

Since we're just a anyway. Then we could remove https://github.com/sindresorhus/Percentage/pull/9 as we would get all those methods for free.

sindresorhus · 6mo ago
Structured data for AI agents

Repository: sindresorhus/Percentage. Description: A percentage type for Swift Stars: 280, Forks: 25. Primary language: Swift. Languages: Swift (100%). License: MIT. Topics: number, percent, percentage, swift-package, type, type-safety. Latest release: v3.0.0 (6mo ago). Open PRs: 0, open issues: 0. Last activity: 6mo ago. Community health: 71%. Top contributors: sindresorhus, alexbinary, magauran, EvanHahn, irisdelaluna.

·@ofershap

Replace github.com with gitshow.dev