git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-04-29 19:04:19 +00:00
parent 10c3910e9b
commit 543cba0252
2 changed files with 7 additions and 7 deletions

View File

@@ -456,17 +456,17 @@ class AnalogClockWindow(wx.PyWindow):
drawDC.DrawPolygon(points)
def _pol2rect(self, r, w, deg=1): # radian if deg=0; degree if deg=1
def _pol2rect(self, r, w, deg=1): # radian if deg=0; degree if deg=1
if deg:
w = math.pi * w / 180.0
w = math.pi * w / 180.0
return r * math.cos(w), r * math.sin(w)
def _rect2pol(self, x, y, deg=1): # radian if deg=0; degree if deg=1
def _rect2pol(self, x, y, deg=1): # radian if deg=0; degree if deg=1
if deg:
return math.hypot(x, y), 180.0 * math.atan2(y, x) / math.pi
return math.hypot(x, y), 180.0 * math.atan2(y, x) / math.pi
else:
return math.hypot(x, y), math.atan2(y, x)
return math.hypot(x, y), math.atan2(y, x)
def _center2corner(self, x, y, tipo, drawDC=None):