Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified tests/resources/ATAN2.xlsx
100644 → 100755
Binary file not shown.
1 change: 1 addition & 0 deletions tests/xlfunctions/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_ATAN(self):
def test_ARTAN2(self):
self.assertAlmostEqual(math.ATAN2(1, 1), 0.785398163)
self.assertAlmostEqual(math.ATAN2(-1, -1), -2.35619449)
self.assertAlmostEqual(math.ATAN2(1, 2), 1.10714872)

def test_CEILING_number(self):
self.assertEqual(math.CEILING(2.5, 1), 3)
Expand Down
6 changes: 6 additions & 0 deletions tests/xlfunctions_vs_excel/atan2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ def test_evaluation_A5(self):
self.evaluator.evaluate('Sheet1!A5'),
self.evaluator.get_cell_value('Sheet1!A5')
)

def test_evaluation_A6(self):
self.assertEqual(
self.evaluator.evaluate('Sheet1!A6'),
self.evaluator.get_cell_value('Sheet1!A6')
)
2 changes: 1 addition & 1 deletion xlcalculator/xlfunctions/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def ATAN2(
https://support.office.com/en-us/article/
atan2-function-c04592ab-b9e3-4908-b428-c96b3a565033
"""
return np.arctan2(float(x_num), float(y_num))
return np.arctan2(float(y_num), float(x_num))


@xl.register()
Expand Down