MCPcopy Create free account
hub / github.com/bighuang624/Algorithms-notes / bounceOffHorizontalWall

Method bounceOffHorizontalWall

code/algs4/Particle.java:213–216  ·  view source on GitHub ↗

Updates the velocity of this particle upon collision with a horizontal wall (by reflecting the velocity in the y -direction). Assumes that the particle is colliding with a horizontal wall at this instant.

()

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected