Skip to content

Commit fdfc92e

Browse files
authored
Apply suggestions from code review
1 parent fcd1f68 commit fdfc92e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

DIRECTORY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
* [Prefix Conversions](conversions/prefix_conversions.py)
170170
* [Prefix Conversions String](conversions/prefix_conversions_string.py)
171171
* [Pressure Conversions](conversions/pressure_conversions.py)
172-
* [Rec To Pol](conversions/rec_to_pol.py)
173172
* [Rgb Cmyk Conversion](conversions/rgb_cmyk_conversion.py)
174173
* [Rgb Hsv Conversion](conversions/rgb_hsv_conversion.py)
175174
* [Roman Numerals](conversions/roman_numerals.py)

conversions/rec_to_pol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import doctest
21
import math
32

43

5-
def rec_to_pol(real: float, img: float) -> tuple:
4+
def rectangular_to_polar(real: float, img: float) -> tuple[float, float]:
65
"""
76
https://en.wikipedia.org/wiki/Polar_coordinate_system
87
@@ -20,7 +19,6 @@ def rec_to_pol(real: float, img: float) -> tuple:
2019
(11.41, 31.31)
2120
>>> rec_to_pol(10000,99999)
2221
(100497.76, 84.29)
23-
2422
"""
2523

2624
mod = round(math.sqrt((real**2) + (img**2)), 2)
@@ -30,4 +28,6 @@ def rec_to_pol(real: float, img: float) -> tuple:
3028

3129

3230
if __name__ == "__main__":
31+
import doctest
32+
3333
doctest.testmod()

0 commit comments

Comments
 (0)