Mercurial > code > home > repos > light9
changeset 1137:05f272019697
Blacklight can multiply and keep its type
Ignore-this: 6b624f8c36b839d603d61177ab86e7c8
author | drewp@bigasterisk.com |
---|---|
date | Sat, 14 Jun 2014 07:14:06 +0000 |
parents | f48be3d18387 |
children | a073565e826e |
files | light9/Effects.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/Effects.py Sat Jun 14 07:10:00 2014 +0000 +++ b/light9/Effects.py Sat Jun 14 07:14:06 2014 +0000 @@ -41,6 +41,9 @@ @register class Blacklight(float): """a level for the blacklight PWM output""" + def __mul__(self, f): + return Blacklight(self * f) + __rmul__ = __mul__ @register def chase(t, ontime=0.5, offset=0.2, onval=1.0,