mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
fix horizontal bsp
This commit is contained in:
parent
b2d8d25366
commit
9125e04e07
1 changed files with 2 additions and 2 deletions
|
|
@ -75,13 +75,13 @@ impl<E: Engine, A: Content<E>, B: Content<E>> Bsp<E, A, B> {
|
||||||
[a.into(), b.into(), [x, y, w, h].into()]
|
[a.into(), b.into(), [x, y, w, h].into()]
|
||||||
},
|
},
|
||||||
East => {
|
East => {
|
||||||
let [x, y, w, h] = outer.center_xy([aw.max(bw), ah + bh]);
|
let [x, y, w, h] = outer.center_xy([aw + bw, ah.max(bh)]);
|
||||||
let a = [x, y, aw, ah];
|
let a = [x, y, aw, ah];
|
||||||
let b = [x + aw, y, bw, bh];
|
let b = [x + aw, y, bw, bh];
|
||||||
[a.into(), b.into(), [x, y, w, h].into()]
|
[a.into(), b.into(), [x, y, w, h].into()]
|
||||||
},
|
},
|
||||||
West => {
|
West => {
|
||||||
let [x, y, w, h] = outer.center_xy([aw.max(bw), ah + bh]);
|
let [x, y, w, h] = outer.center_xy([aw + bw, ah.max(bh)]);
|
||||||
let a = [x + bw, y, aw, ah];
|
let a = [x + bw, y, aw, ah];
|
||||||
let b = [x, y, bw, bh];
|
let b = [x, y, bw, bh];
|
||||||
[a.into(), b.into(), [x, y, w, h].into()]
|
[a.into(), b.into(), [x, y, w, h].into()]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue