aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/color.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/color.spad.pamphlet')
-rw-r--r--src/algebra/color.spad.pamphlet4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/algebra/color.spad.pamphlet b/src/algebra/color.spad.pamphlet
index 56801bff..4a6b7387 100644
--- a/src/algebra/color.spad.pamphlet
+++ b/src/algebra/color.spad.pamphlet
@@ -74,7 +74,9 @@ Color(): Exports == Implementation where
if (xHueSmaller:= (diff < 0)) then diff := -diff
if (moreThanHalf:=(diff > totalHues quo 2)) then diff := totalHues-diff
offset : I := wholePart(round (diff::SF/(2::SF)**(x.weight/y.weight)) )
- if (xHueSmaller and ^moreThanHalf) or (^xHueSmaller and moreThanHalf) then
+ if (xHueSmaller and not moreThanHalf)
+ or (not xHueSmaller and moreThanHalf)
+ then
ans := x.hue + offset
else
ans := x.hue - offset