You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation appears to be more or less correct, but is rather awkwardly imprecise when it comes to lerp'ed values. See this unit test and the associated one for lerp (called LerpBasic); in even this simple test cases, lerp'ed values are off by 5 (eg 5/55 = ~2%) from what they should be.
It is likely some imprecision is unavoidable, particularly with floats; but it seems at least reasonable to expect more precision than this.
The text was updated successfully, but these errors were encountered:
Chris3606
changed the title
Make Gradient.Lerp and Gradient.ToColorArray More Imprecise
Make Gradient.Lerp and Gradient.ToColorArray More Precise
Jan 22, 2023
The current implementation appears to be more or less correct, but is rather awkwardly imprecise when it comes to lerp'ed values. See this unit test and the associated one for lerp (called
LerpBasic
); in even this simple test cases, lerp'ed values are off by 5 (eg 5/55 = ~2%) from what they should be.It is likely some imprecision is unavoidable, particularly with floats; but it seems at least reasonable to expect more precision than this.
The text was updated successfully, but these errors were encountered: