edouard@2872: // bbox_intersect.ysl2 edouard@2872: // edouard@2872: // bounding boxes intersection tests Edouard@2779: edouard@2872: // Rates 1D intersection of 2 segments A and B edouard@2872: // described respectively with a0,a1 and b0,b1 edouard@2872: def "func:intersect_1d" { edouard@2872: // it is assumed that a1 > a0 and b1 > b0 edouard@2872: param "a0"; edouard@2872: param "a1"; edouard@2872: param "b0"; edouard@2872: param "b1"; Edouard@2792: edouard@2872: const "d0", "$a0 >= $b0"; edouard@2872: const "d1", "$a1 >= $b1"; edouard@2872: choose { edouard@2872: when "not($d0) and $d1" edouard@2872: // b contained in a edouard@2872: // a0