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 VolumeLevel::ZERO #10608

Merged
merged 1 commit into from
Nov 17, 2023
Merged

Conversation

johanhelsing
Copy link
Contributor

Objective

  • Handy to have a constant instead of VolumeLevel::new(0.0)
  • VolumeLevel::new is not const

Solution

  • Adds a VolumeLevel::ZERO constant, which we have for most of our other types where it makes sense.

Changelog

  • Add VolumeLevel::ZERO

Copy link
Contributor

@killercup killercup left a comment

Choose a reason for hiding this comment

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

FYI Volume::new() can become const after rust-lang/rust#72505

@alice-i-cecile alice-i-cecile added A-Audio Sounds playback and modification C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Nov 17, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 17, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Nov 17, 2023
Merged via the queue into bevyengine:main with commit 201f5b2 Nov 17, 2023
25 checks passed
rdrpenguin04 pushed a commit to rdrpenguin04/bevy that referenced this pull request Jan 9, 2024
# Objective

- Handy to have a constant instead of `VolumeLevel::new(0.0)`
- `VolumeLevel::new` is not `const`

## Solution

- Adds a `VolumeLevel::ZERO` constant, which we have for most of our
other types where it makes sense.

---

## Changelog

- Add `VolumeLevel::ZERO`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Audio Sounds playback and modification C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants