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

Implement Random.Choice extension method #725

Closed
AntyaDev opened this issue Sep 2, 2024 · 0 comments
Closed

Implement Random.Choice extension method #725

AntyaDev opened this issue Sep 2, 2024 · 0 comments
Labels
5.8 new feature New feature or request
Milestone

Comments

@AntyaDev
Copy link
Contributor

AntyaDev commented Sep 2, 2024

Documentation link

This function randomly selects an item based on relative weight/probabilities across all data items.

in this example:

  • step_1 has weight 1 = 50%
  • step_2 has weight 2 = 100%
var stepName = context.Random.Choice(("step_1", 1), ("step_2", 2))
@AntyaDev AntyaDev added new feature New feature or request 5.8 labels Sep 2, 2024
@AntyaDev AntyaDev added this to the 5.8.0 milestone Sep 2, 2024
@AntyaDev AntyaDev closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.8 new feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant