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 salted version of sampler functions in EXPRESSION samplers #455

Open
wants to merge 3 commits into
base: ver/6.5.0
Choose a base branch
from

Conversation

pumken
Copy link

@pumken pumken commented Apr 21, 2024

Pull Request

A slightly less naïve implementation of #371. Every sampler specified in an EXPRESSION sampler generates two functions: sampler(Point) and samplerSalted(Point, double). The salted version requires an additional, mandatory argument for salt, per Astrash's recommendation.

May require a documentation change to record the existence of this feature and to warn against duplication of function names. Though highly unlikely, this change breaks config packs that result in name duplication.

The previous PR was closed so that the git history can be made cleaner without the need for revert commits.

Again open for any feedback at all.

Closes #371.

Changelog

  • Add additional salted version of samplers in EXPRESSIONs.

Checklist

Mandatory checks

  • The base branch of this PR is an unreleased version branch (that has a ver/ prefix)
    or is a branch that is intended to be merged into a version branch.
  • There are no already existing PRs that provide the same changes.
  • The PR is within the scope of Terra (i.e. is something a configurable terrain generator should be doing).
  • Changes follow the code style for this project.
  • I have read the CONTRIBUTING.md
    document in the root of the git repository.

Types of changes

  • Bug Fix
  • Build system
  • Documentation
  • New Feature
  • Performance
  • Refactoring
  • Repository
  • Revert
  • Style
  • Tests
  • Translation

Compatibility

  • Introduces a breaking change
  • Introduces new functionality in a backwards compatible way.
  • Introduces bug fixes

Documentation

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Testing

  • I have added tests to cover my changes.
  • All new and existing tests passed.

Licensing

  • I am the original author of this code, and I am willing to
    release it under GPLv3.
  • I am not the original author of this code, but it is in public domain or
    released under GPLv3 or a compatible license.

Copy link
Member

@duplexsystem duplexsystem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

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.

None yet

2 participants