src/cplib/geometry/ccw

  Source   Edit

Procs

proc ccw[T](l: Line[T]; p: Point[T]; strict: bool = false): int
直線と点の位置関係を整数で返す. COUNTER_CLOCKWISE: 2, CLOCKWISE: -2, ON_SEGMENT: 0, ONLINE_BACK: 1, ONLINE_FRONT: -1   Source   Edit
proc ccw[T](p1, p2, p3: Point[T]; strict: bool = false): int
3点の位置関係を整数で返す. COUNTER_CLOCKWISE: 2, CLOCKWISE: -2, ON_SEGMENT: 0, ONLINE_BACK: 1, ONLINE_FRONT: -1   Source   Edit
proc online[T](l: Line[T]; p: Point[T]): bool
点pが直線l上にあるかどうかを判定   Source   Edit
proc online[T](p1, p2, p3: Point[T]): bool
点p3が p1, p2 を通る直線上にあるかどうかを判定   Source   Edit