chiro 0.1.3

A curses-style terminal view that runs inside a pixel buffer (Rewrite of chiropterm)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::shared::*;
use euclid::*;

pub(crate) fn build_rect(xy1: Zel, xy2: Zel) -> ZelRect {
    let min_x = xy1.x.min(xy2.x);
    let max_x = xy1.x.max(xy2.x);

    let min_y = xy1.y.min(xy2.y);
    let max_y = xy1.y.max(xy2.y);

    rect(min_x, min_y, max_x - min_x, max_y - min_y)
}