PaletteOptimiser

Changeset

61:0b1174b0f444
2015-10-09 Paul Boddie raw files shortlog changelog graph Initialise the extra function properly for module usage.
optimiser.py (file)
     1.1 --- a/optimiser.py	Fri Oct 09 00:01:29 2015 +0200
     1.2 +++ b/optimiser.py	Fri Oct 09 00:25:02 2015 +0200
     1.3 @@ -35,6 +35,8 @@
     1.4  
     1.5  # Basic colour operations.
     1.6  
     1.7 +def extra(x): return x
     1.8 +
     1.9  def within(v, lower, upper):
    1.10      return min(max(v, lower), upper)
    1.11  
    1.12 @@ -336,8 +338,6 @@
    1.13      use_square = "-2" in options
    1.14      if use_square:
    1.15          extra = square
    1.16 -    else:
    1.17 -        extra = (lambda x: x)
    1.18  
    1.19      # General output options.
    1.20