Yoga alternative
shell
cargo test
```rs use soga::flexbox::FlexBox; use soga::flexbox::FlexItem; use std::convert::TryInto;
fn main() { let mut root = FlexItem::new(100, 100);
let child1 = FlexItem::new(100, 50);
let child2 = FlexItem::new(100, 50);
root.add(child1);
root.add(child2);
let mut flexbox = FlexBox::new();
flexbox.layout(&mut root);
assert_eq!(root.children[0].frame, [0, 0, 100, 50]);
assert_eq!(root.children[1].frame, [50, 0, 100, 50]);
}
```
MIT ©yisar inspired by yoga.