Skip to content

Instantly share code, notes, and snippets.

@bil-bas
Created January 30, 2012 02:45
Show Gist options
  • Save bil-bas/1702157 to your computer and use it in GitHub Desktop.
Save bil-bas/1702157 to your computer and use it in GitHub Desktop.
def pitch(angle)
a = angle.degrees_to_radians
@velocity = Matrix[[Math::cos(a), -Math::sin(a)], [Math::sin(a), Math::cos(a)]] * @velocity
end
def pitch_up; pitch 3; end
def pitch_down; pitch -3; end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment