Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Possible defect in the source code #107

Open
AppChecker opened this issue Feb 5, 2018 · 0 comments
Open

Possible defect in the source code #107

AppChecker opened this issue Feb 5, 2018 · 0 comments

Comments

@AppChecker
Copy link

Hi.

SpringOverScroller.java#L86-L87: getCurrVelocity

  public float getCurrVelocity() {
    double velX = mSpringX.getVelocity();
    double velY = mSpringX.getVelocity();
    return (int) Math.sqrt(velX * velX + velY * velY);
  }

It is suspicious that the variables 'velX' and 'velY' are initialized with the same value.

Probably, it should be:

  public float getCurrVelocity() {
    double velX = mSpringX.getVelocity();
    double velY = mSpringY.getVelocity();
    return (int) Math.sqrt(velX * velX + velY * velY);
  }

This possible defect found by AppChecker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant