-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Move types, clean imports, move interpolate method #903
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #903 +/- ##
==========================================
+ Coverage 92.73% 92.79% +0.05%
==========================================
Files 105 105
Lines 4683 4689 +6
Branches 1323 1323
==========================================
+ Hits 4343 4351 +8
+ Misses 340 338 -2 ☔ View full report in Codecov by Sentry. |
@birkskyum I believe you are familiar with most of the code changes here. |
@@ -0,0 +1,9 @@ | |||
export function interpolateNumber(from: number, to: number, t: number): number { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it reminded me of something - wonder if they're equally fast.
https://github.com/maplibre/maplibre-gl-js/blob/3d318e80220d083a960051e8601b107ce3f4ee77/src/util/util.ts#L210-L218
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to bench the two lerps against each other at some point - for the fun of it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is definitely better
Launch Checklist
This PR is mainly a refactoring of exiting code.
There were some classes that were placed in utils instead of types folder.
I moved the code around to fix that.
Also removed the deprecated interpolation factory.
I moved the imports to be at the begging of the file where I saw that this was not the case.