output-poitsHsvRgbtransformfor i := 1; i < in.size; i += 1i++normalizenormalisey := out.first
if x <= in.first: y = out.firsty/num := ?reducetransformin.reduce: | previous current |
if x <= current:
x-norm/float := normalise x.to-float previous current
return scale x-norm previous current
current // Use 'current' as the next previous.y := in.reduce: | previous current |
if x <= current:
x-norm/float := normalize x.to-float previous current
scale x-norm previous current
else:
currentreturn__