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

⭐ number.inRange support #2952

Merged
merged 1 commit into from
Jan 6, 2024
Merged

⭐ number.inRange support #2952

merged 1 commit into from
Jan 6, 2024

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Jan 6, 2024

Support a simpler methods to see if a number is in range.

So far users have to:

num >= 3 && num <= 5

Now you can:

num.inRange(min,  max)

Example:

3.inRange(3, 5)

This supports both integers and floats. Dict support is coming next.

Support a simpler methods to see if a number is in range.

So far users have to:

```coffee
num >= 3 && num <= 5
```

Now you can:

```coffee
num.inRange(3, 5)
```

This supports both integers and floats. Dict support is coming next.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
arlimus added a commit that referenced this pull request Jan 6, 2024
After #2952

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Copy link
Contributor

@scottford-io scottford-io 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 @arlimus ! 🙌

@scottford-io scottford-io merged commit 6c9a3f0 into main Jan 6, 2024
10 checks passed
@scottford-io scottford-io deleted the dom/inRange branch January 6, 2024 03:18
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants