Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
haruyama480 committed Oct 29, 2023
1 parent 80416a2 commit 856deb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/atcoder/extra/geometry/geometry_template.nim
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ when not declared ATCODER_GEOMETRY_TEMPLATE_HPP:
if intersect(l, m): 0.Real else: distance(l, m.a)

swappableProc distance(s: Segment[Real], p: Point[Real]):
let r = p.projection(s)
let cp = dot(r-s.a, s.b-s.a)
if cp >= 0 and cp <= abs(s.b-s.a)^2: return abs(r - p)
let r p= p.projection(s)
let d = dot(r-s.a, s.b-s.a)
if d >= 0 and d <= abs(s.b-s.a)^2: return abs(r - p)
return min(abs(s.a - p), abs(s.b - p))

# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_2_D
Expand Down

0 comments on commit 856deb8

Please sign in to comment.