function map_rect(p) {
    let [pxa, pya, pxb, pyb] = p;
    let [ptxa, ptya, ptxb, ptyb] = [
        pxa/(1+pxa), pya/(1+pya), pxb/(1+pxb), pyb/(1+pyb)
    ];
    return [ptxa, ptya, 1-ptxb, 1-ptyb];
}
// map padding/margin into internal boxes
map padding/margin into internal boxes
map padding / margin into internal boxes
function map_rect(p) {
    let [pxa, pya, pxb, pyb] = p;
    let [ptxa, ptya, ptxb, ptyb] = [
        pxa/(1+pxa), pya/(1+pya), pxb/(1+pxb), pyb/(1+pyb)
    ];
    return [ptxa, ptya, 1-ptxb, 1-ptyb];
}
function map_rect ( p ) { let [ pxa , pya , pxb , pyb ] = p ; let [ ptxa , ptya , ptxb , ptyb ] = [ pxa / ( 1 + pxa ) , pya / ( 1 + pya ) , pxb / ( 1 + pxb ) , pyb / ( 1 + pyb ) ] ; return [ ptxa , ptya , 1 - ptxb , 1 - ptyb ] ; }
map padding/margin into internal boxes
map padding / margin into internal boxes