mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 22:42:08 +00:00
Size::height
sets width
not height
(#7478)
# Objective
```rust
pub const fn height(width: Val) -> Self {
Self {
width,
height: Val::DEFAULT,
}
}
```
😓
## Solution
Swap `width` and `height`.
This commit is contained in:
parent
be46d1502b
commit
00ff8adfd6
1 changed files with 3 additions and 3 deletions
|
@ -374,10 +374,10 @@ impl Size {
|
|||
}
|
||||
|
||||
/// Creates a new [`Size`] where `height` takes the given value.
|
||||
pub const fn height(width: Val) -> Self {
|
||||
pub const fn height(height: Val) -> Self {
|
||||
Self {
|
||||
width,
|
||||
height: Val::DEFAULT,
|
||||
width: Val::DEFAULT,
|
||||
height,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue