X-Git-Url: https://git.ctpug.org.za/?p=tabakrolletjie.git;a=blobdiff_plain;f=tabakrolletjie%2Frays.py;h=b4142a3e6694f8ecaeb4f67264a4bb270ca7a025;hp=7c8b5beab712c0fe756afbb7645afc92fc3b563c;hb=a2c09130986d18095773c96b9dc797f3b3eb542d;hpb=aeed77cd9edcf4a13c391a919a033862ff31cbdf diff --git a/tabakrolletjie/rays.py b/tabakrolletjie/rays.py index 7c8b5be..b4142a3 100644 --- a/tabakrolletjie/rays.py +++ b/tabakrolletjie/rays.py @@ -156,6 +156,12 @@ class RayPolyManager(object): self._end = self._direction.rotated(-spread) self._poly_cache = None + @property + def spread(self): + if not self._direction: + return 2 * math.pi + return math.fabs(self._start.get_angle_between(self._end)) + def _set_angle_limits(self, direction, spread): if direction is None or spread is None: self._direction = None