X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24054d48e941a1c86cdc01fdfaaf46ac1ff007ff..25b3661bd4cb44304418b93c0dee1d0dfb99765c:/wxPython/wx/lib/analogclock.py?ds=sidebyside diff --git a/wxPython/wx/lib/analogclock.py b/wxPython/wx/lib/analogclock.py index 442dd0f0e4..ce30eaa68d 100644 --- a/wxPython/wx/lib/analogclock.py +++ b/wxPython/wx/lib/analogclock.py @@ -20,6 +20,9 @@ # o Many ehnacements # +""" +`AnalogClockWindow` is a simple analog clock class. +""" import math import sys @@ -456,17 +459,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):