Skip to content

palette: avoid floating point errors with dense palettes

Sebastien Binet requested to merge floats into master

Created by: kortschak

When a user specifies a very dense palette (see #290 for an example), floating point error can accumulate resulting in unexpected color.Color values (zero in the case above). Rather than warning users to avoid overly dense palettes, just avoid the error by using multiplication rather than successive addition.

@sbinet @jasonpfox Please take a look.

Merge request reports