Skip to content

Instantly share code, notes, and snippets.

@bomatson
Created March 14, 2014 21:20
Show Gist options
  • Save bomatson/9557206 to your computer and use it in GitHub Desktop.
Save bomatson/9557206 to your computer and use it in GitHub Desktop.
def is_a_hit?(timestamp, y_velocity)
if @previous[:y_velocity] && y_velocity && @previous[:y_velocity] > 0 && y_velocity < 0 && (timestamp - @previous[:timestamp] > 500)
true
end
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment