diff options
Diffstat (limited to 'Master/texmf/asymptote/palette.asy')
-rw-r--r-- | Master/texmf/asymptote/palette.asy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Master/texmf/asymptote/palette.asy b/Master/texmf/asymptote/palette.asy index fabbdc2cd5b..41a40a04a85 100644 --- a/Master/texmf/asymptote/palette.asy +++ b/Master/texmf/asymptote/palette.asy @@ -305,7 +305,7 @@ pen[] Wheel(int NColors=32766) if(settings.gray) return Grayscale(NColors); int nintervals=6; - int n=quotient(NColors,nintervals); + int n=-quotient(NColors,-nintervals); pen[] Palette; if(n == 0) return Palette; @@ -333,7 +333,7 @@ pen[] Rainbow(int NColors=32766) int offset=1; int nintervals=5; - int n=quotient(NColors-1,nintervals); + int n=-quotient(NColors-1,-nintervals); pen[] Palette; if(n == 0) return Palette; @@ -366,7 +366,7 @@ private pen[] BWRainbow(int NColors, bool two) if(two) nintervals += 6; int num=NColors-offset; - int n=quotient(num,nintervals*divisor)*divisor; + int n=-quotient(num,-nintervals*divisor)*divisor; NColors=n*nintervals+offset; pen[] Palette; @@ -395,7 +395,7 @@ private pen[] BWRainbow(int NColors, bool two) for(int i=0; i < n; ++i) Palette[k+i]=rgb(1.0-i*ninv,0.0,1.0); else { - int n3=quotient(n,3); + int n3=-quotient(n,-3); int n23=2*n3; real third=n3*ninv; real twothirds=n23*ninv; |