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

Adds RunPlanVector::setPropertyStep() #1152

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Nov 23, 2023

This has behaviour similar to Python's range(), more appropriate than lerp in many cases with integers.

Providing this will hopefully help people avoid using lerp wrongly for integers.

FLAMEGPU/FLAMEGPU2-docs#175

alt possible names:

  • setPropertyUniformStep()
  • setPropertyInterval()
  • setPropertyUniformInterval()
  • setPropertyRange() (reminds me of Python's range() although it's not 1-1 as the length is predefined).

This has behaviour similar to Python's range(), more appropriate than lerp in many cases with integers.

Providing this will hopefully help people avoid using lerp wrongly for integers.
Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

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

Looks fine, not tested locally but test looks sane.

(step might be getting a bit overloaded, but there should be enough context that it's not a problem)

@Robadob
Copy link
Member Author

Robadob commented Nov 23, 2023

I've ran both tests Windows.

@mondus mondus merged commit 3801865 into master Nov 24, 2023
20 checks passed
@mondus mondus deleted the runplanvector_setpropstep branch November 24, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants