rMultiGradient function

List<List<num>> rMultiGradient (
  1. num n,
  2. List<List<num>> colors
)

returns a rounded, length n array of Vector3 colours. colours are the ones formed from the linearGradient(n/(numColours-1), color1, color2) for all colours color1, color2, ..., colorN

Implementation

List<List<num>> rMultiGradient(num n, List<List<num>> colors) {
  return multiGradient(n, colors)
      .map((color) => color.map((c) => c.round()).toList())
      .toList();
}