Closed bob0the0mighty closed 10 years ago
1) there already is a _clamp
method for doing this,
2) your patch fails in the case when diff
is not an Array
,
3) I do not see clamping colors in randomize()
as a wise choice. Colors are best manipulated unclamped - you fix only the final value (as we do in ROT.Color.to{RGB,Hex}
). This is similar to float number manipulation - you only want to round the final value, not intermediate results.
Cool. So I was using it incorrectly :-). Thanks for clearing that up.
Changed randomize so that it returns only valid color triplets.