No.11593986 ViewReplyOriginalReport
Hey guys ! I've been thinking really hard lately about hashing algorithms and was wondering - what kind of math this question leads to:

Say x values are the values on the left, and y values are the values on the right.
We need to find a function f(x) = y, such that it:
Maps 3.75 to 0
4.5 to 1
5.25 to 2
2.5 to 3
3 to 4
3.5 to 5
-1.25 to 6
-1.5 to 7
-1.75 to 8

How do you go about finding a function which does this mapping? Is this linear combinations or some shit? Thanks a lot

It's not for some homework or some shit btw it's for finding a clever way to do volumetric ray tracing in a game - pic rel