Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CGFloat output type scale implementations #9

Merged
merged 5 commits into from Apr 1, 2022
Merged

Conversation

heckj
Copy link
Member

@heckj heckj commented Mar 31, 2022

resolves #2

@heckj heckj self-assigned this Mar 31, 2022
@codecov
Copy link

codecov bot commented Mar 31, 2022

Codecov Report

Merging #9 (0a46205) into main (751c171) will increase coverage by 1.03%.
The diff coverage is 96.62%.

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   90.89%   91.93%   +1.03%     
==========================================
  Files          16       18       +2     
  Lines        1285     1314      +29     
==========================================
+ Hits         1168     1208      +40     
+ Misses        117      106      -11     
Impacted Files Coverage Δ
Sources/SwiftVizScale/Scale.swift 100.00% <ø> (ø)
Sources/SwiftVizScale/Tick.swift 100.00% <ø> (ø)
Sources/SwiftVizScale/TickScale.swift 86.48% <ø> (ø)
Tests/SwiftVizScaleTests/LogScaleTests.swift 80.14% <85.00%> (-0.75%) ⬇️
Sources/SwiftVizScale/PowerScale.swift 93.75% <93.75%> (-2.92%) ⬇️
Sources/SwiftVizScale/NiceValue.swift 94.98% <94.02%> (-0.34%) ⬇️
Tests/SwiftVizScaleTests/LinearScaleTests.swift 83.01% <94.73%> (+1.67%) ⬆️
Sources/SwiftVizScale/LinearScale.swift 96.15% <96.15%> (-3.85%) ⬇️
Sources/SwiftVizScale/LogScale.swift 96.29% <96.29%> (+0.46%) ⬆️
Sources/SwiftVizScale/ConvertibleWithDouble.swift 100.00% <100.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 751c171...0a46205. Read the comment docs.

- replaced explicit concrete typed methods with generic
- added ConvertibleToDouble protocol to constrain input types and
  transform up to Double, and downcast appropriately (rounding down)
- reset all the tests to accomodate the rewritten methods
@heckj heckj merged commit 5ad1cb4 into main Apr 1, 2022
@heckj heckj deleted the 2-add-concrete-scale branch April 1, 2022 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add concrete scale implementations that support CGFloat as an output type
1 participant