MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / Point

Class Point

geometry/segment_intersection.py:17–27  ·  view source on GitHub ↗

A point in 2D space. >>> Point(0, 0) Point(x=0, y=0) >>> Point(1, -3) Point(x=1, y=-3)

Source from the content-addressed store, hash-verified

15
16
17class Point(NamedTuple):
18 """A point in 2D space.
19
20 >>> Point(0, 0)
21 Point(x=0, y=0)
22 >>> Point(1, -3)
23 Point(x=1, y=-3)
24 """
25
26 x: float
27 y: float
28
29
30def direction(pivot: Point, target: Point, query: Point) -> float:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected