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