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

[FR] Selectable range for random number #352

Closed
Hypnos3 opened this issue Nov 7, 2021 · 4 comments
Closed

[FR] Selectable range for random number #352

Hypnos3 opened this issue Nov 7, 2021 · 4 comments
Assignees
Labels
💡 enhancement New feature or request

Comments

@Hypnos3
Copy link
Collaborator

Hypnos3 commented Nov 7, 2021

For Random number allow also to define lower limit.
Maybe as range of the form 10.34-30.123

@Hypnos3 Hypnos3 changed the title FR Selectable range for random number [FR] Selectable range for random number Nov 7, 2021
@Hypnos3 Hypnos3 self-assigned this Nov 7, 2021
@Hypnos3 Hypnos3 added the 💡 enhancement New feature or request label Nov 7, 2021
@Hypnos3
Copy link
Collaborator Author

Hypnos3 commented Nov 7, 2021

implemented in 2.0.2

@Hypnos3 Hypnos3 closed this as completed Nov 7, 2021
@hvorragend
Copy link

Really great. So I can remove my delay nodes.

@hvorragend
Copy link

I've found the following regex: ^(?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?([\/|](?:[1-9]|-0\.|0\.|-)\d*(?:\.\d+)?)?$
But could you please tell me which syntax I have to use?

@Hypnos3
Copy link
Collaborator Author

Hypnos3 commented Nov 8, 2021

I have documented this already in the wiki.

The Regex allows

  • one number
    • 20
    • -30
    • 20.123
    • -45.123
    • 0.678
    • -0.456
  • two numbers separated by / or |
    • I plan to allow Komma and semicolon later to add. Originally I want to have a dash, but this collide with minus if the second number is negative.
    • 20/50
    • -30/10
    • 20.123/70.124
    • -45.123/-34.567

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement New feature or request
Development

No branches or pull requests

2 participants