Skip to content

Instantly share code, notes, and snippets.

@stemmlerjs
Created March 13, 2019 13:04
Show Gist options
  • 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