Skip to content

Commit

Permalink
Fix typo in cga.Round.radius that made it always 1 (#372)
Browse files Browse the repository at this point in the history
`/` should have been `/=`.
  • Loading branch information
pavlo-melnyk committed Oct 22, 2020
1 parent 67ea8ae commit 1c3c200
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion clifford/cga.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def radius(self):
radius of the round (a float)
'''
dual_sphere = self.dual
dual_sphere / (-dual_sphere | self.cga.einf)
dual_sphere /= (-dual_sphere | self.cga.einf)
return math.sqrt(abs(dual_sphere * dual_sphere))

@property
Expand Down
2 changes: 0 additions & 2 deletions clifford/test/test_cga.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def test_from_points_construction(cga, method):
assert method(cga, e1, e2, e3).mv == method(cga, e1, e2, cga.up(e3)).mv


@pytest.mark.xfail(raises=AssertionError, reason='gh-184')
def test_round_from_center_radius_init(cga):
blades = cga.layout.blades
e1 = blades['e1']
Expand All @@ -92,7 +91,6 @@ def test_round_from_center_radius_init(cga):
npt.assert_almost_equal(c.radius, 5)


@pytest.mark.xfail(raises=AssertionError, reason='gh-184')
def test_round_from_center_radius_method(cga):
blades = cga.layout.blades
e1 = blades['e1']
Expand Down

0 comments on commit 1c3c200

Please sign in to comment.