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

feat: make sqrt constants #72

Merged
merged 1 commit into from
Jul 26, 2024
Merged

feat: make sqrt constants #72

merged 1 commit into from
Jul 26, 2024

Conversation

dmnsgn
Copy link
Contributor

@dmnsgn dmnsgn commented Jul 10, 2024

The previous PR actually only fixed 2 of the 4 warnings in rollup. Somehow the REPL online is not reporting them (as you can see from the links in that comment earlier) although I am using the same 4.18.1 rollup version locally.
So apologies for the second PR in a row, the repl wasn't enough 😕 But I have tested with a real use case now.

Here I have extracted the two sqrt calls into const which has two benefits:

  • performance/size: saves a few bytes when tested with terser (when using noise 2D and noise 4D, noise 3D is not using the sqrts' so nothing more is eliminated)
  • actually fix rollup annotation warnings

- performance: saves a few bytes when tested with terser
- actually fix rollup annotation warning
@jwagner
Copy link
Owner

jwagner commented Jul 10, 2024

No worries, I didn't catch it either. It's a bit late now but I'll have a look later. :)

@jwagner jwagner merged commit 1c248e6 into jwagner:main Jul 26, 2024
4 checks passed
@jwagner
Copy link
Owner

jwagner commented Jul 26, 2024

Released in 4.0.3. Thanks again @dmnsgn. :)

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.

2 participants