We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Urect::width
Urect::height
1 parent 42e6dc8 commit 36eedbfCopy full SHA for 36eedbf
crates/bevy_math/src/rects/urect.rs
@@ -130,7 +130,7 @@ impl URect {
130
/// assert_eq!(r.width(), 5);
131
/// ```
132
#[inline]
133
- pub fn width(&self) -> u32 {
+ pub const fn width(&self) -> u32 {
134
self.max.x - self.min.x
135
}
136
@@ -144,7 +144,7 @@ impl URect {
144
/// assert_eq!(r.height(), 1);
145
146
147
- pub fn height(&self) -> u32 {
+ pub const fn height(&self) -> u32 {
148
self.max.y - self.min.y
149
150
0 commit comments