# HG changeset patch # User Paul Boddie # Date 1444293750 -7200 # Node ID 1af9f6724ea2769235756245890737b76f2ffb7e # Parent 8fd84d0ba366a57caad776fff3b120d16fb92441 Made the experimental square function application slightly cleaner. diff -r 8fd84d0ba366 -r 1af9f6724ea2 optimiser.py --- a/optimiser.py Wed Oct 07 15:55:52 2015 +0200 +++ b/optimiser.py Thu Oct 08 10:42:30 2015 +0200 @@ -75,7 +75,7 @@ # Get the colour with components scaled from 0 to 1, plus the inverted # component values. - rgb = square(scale(rgb)) + rgb = extra(scale(rgb)) rgbi = invert(rgb) pairs = zip(rgbi, rgb) @@ -329,7 +329,11 @@ # Experimental colour distribution modification. - square = "-2" in options and square or (lambda x: x) + use_square = "-2" in options + if use_square: + extra = square + else: + extra = (lambda x: x) # General output options.