Comment detail

長方形の交差判定 (Nested Flatten)

Standard MLの論理積、andalsoは長いので別名定義。

1
2
3
4
5
infix &
fun x & y = x andalso y

fun overlap r1 r2 =
  (#t r1 > #b r2) & (#r r1 < #l r2) & (#b r1 < #t r2) & (#l r1 > #r r2)

Index

Feed

Other

Link

Pathtraq

loading...