Skip to content

Instantly share code, notes, and snippets.

@stemmlerjs
Created March 13, 2019 13:04
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 stemmlerjs/f761df79b27dddf28c40244642dee55f to your computer and use it in GitHub Desktop.
Save stemmlerjs/f761df79b27dddf28c40244642dee55f to your computer and use it in GitHub Desktop.
Not very clean or pleasant code at all
function calculateIt (a, b) {
if (a.delta < b.element.x) {
var x = b.element.x;
return x - b.delta.x
} else {
var y = b.next.y;
var h = b.element.y * 2;
return y - h
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment