Topic on User talk:Cheldra
Jump to navigation
Jump to search
This page shows the changes between two versions of a post by Cheldra in the topic "Thanks and welcome" on User talk:Cheldra.
You can see other versions of this post at its history page.
Line 5: | Line 5: | ||
I don't know how possible it would be to implement the curve within the wiki, if it is straightforward, here's my python function in case it's helpful: | I don't know how possible it would be to implement the curve within the wiki, if it is straightforward, here's my python function in case it's helpful: | ||
− | + | def post_process_curve(pre, x=[0, 5, 40, 10000], y=[0, 14, 40, 10000]): | |
for i in range(len(x)): | for i in range(len(x)): | ||
if pre < x[i]: | if pre < x[i]: | ||
gradient = (y[i] - y[i - 1])/(x[i] - x[i - 1]) | gradient = (y[i] - y[i - 1])/(x[i] - x[i - 1]) | ||
progress = pre - x[i - 1] | progress = pre - x[i - 1] | ||
− | return y[i - 1] + gradient*progress | + | return y[i - 1] + gradient*progress |