Skip to content

Commit 42ae5a6

Browse files
committed
docs: document new Direction's properties
1 parent 96f40bd commit 42ae5a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

routingpy/direction.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,20 @@ def distance(self) -> int:
116116

117117
@property
118118
def km(self) -> float:
119+
"""
120+
The distance of the entire trip in kilometers.
121+
122+
:rtype: float
123+
"""
119124
return self.distance / 1000
120125

121126
@property
122127
def mi(self) -> float:
128+
"""
129+
The distance of the entire trip in miles.
130+
131+
:rtype: float
132+
"""
123133
return self.distance * 0.0006213712
124134

125135
@property

0 commit comments

Comments
 (0)