Vector2f n = new Vector2f();
Vector2f.sub(fixedBallPosition, ball.getPosition(), n);
n.normalise();
// project velocity onto n and scale by 2
n.scale(2.0f * Vector2f.dot(ball.getVelocity(), n));
Vector2f newVel = new Vector2f();
// add -projected velocity to velocity
Vector2f.sub(ball.getVelocity(), n, newVel);
ball.setVelocity(newVel);