Mon, 22 Jan 2018 18:23:19 +0200
refactor
geometry.py | file | annotate | diff | comparison | revisions | |
tests/quadrilaterals.py | file | annotate | diff | comparison | revisions |
--- a/geometry.py Mon Jan 22 18:07:19 2018 +0200 +++ b/geometry.py Mon Jan 22 18:23:19 2018 +0200 @@ -1,6 +1,6 @@ def degree_rep(angle): from math import degrees - return '∠ %.2f°' % degrees(angle) + return '%.2f°' % degrees(angle) def position_vector(vertex): assert isinstance(vertex, Vertex)
--- a/tests/quadrilaterals.py Mon Jan 22 18:07:19 2018 +0200 +++ b/tests/quadrilaterals.py Mon Jan 22 18:23:19 2018 +0200 @@ -1,4 +1,4 @@ -from math import acos, degrees, radians, pi as π +from math import radians from testsuite import warning, error from geometry import * @@ -36,8 +36,8 @@ }, 'messages': { 'skew-error': lambda skew_angle: - str.format('skew quadrilateral (plane angle {}°)', - '%.2f' % degrees(skew_angle), + str.format('skew quadrilateral (plane angle {})', + degree_rep(skew_angle), ), 'concave-error': 'concave quadrilateral', },