Skip to content

Instantly share code, notes, and snippets.

@dudo
Created January 12, 2022 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dudo/1affcae4825ba4c0635aa3348ad812a1 to your computer and use it in GitHub Desktop.
Save dudo/1affcae4825ba4c0635aa3348ad812a1 to your computer and use it in GitHub Desktop.
def step(min: 1, comp: 20)
return 0 if min == comp
(1 - (min - comp).abs / (min - comp).to_f) / 2
end
@dudo
Copy link
Author

dudo commented Apr 19, 2022

Datadog now has cutoff_min which is wayyyyyyy easier to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment