geometry.py

changeset 22
9bb00170780b
parent 15
45b3aeb25003
child 24
f8080ffceaa9
equal deleted inserted replaced
21:8006fb8cdb77 22:9bb00170780b
1 def degree_rep(angle): 1 def degree_rep(angle):
2 from math import degrees 2 from math import degrees
3 return '∠ %.2f°' % degrees(angle) 3 return '%.2f°' % degrees(angle)
4 4
5 def position_vector(vertex): 5 def position_vector(vertex):
6 assert isinstance(vertex, Vertex) 6 assert isinstance(vertex, Vertex)
7 return Vector(*vertex.coordinates) 7 return Vector(*vertex.coordinates)
8 8

mercurial