Skip to content

Commit

Permalink
Improved cube rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
david-palm committed Sep 23, 2022
1 parent 7112a63 commit b579fcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ public void onUpdate(){
}

public void startDeceleration(){
inertia.setDuration((long) (rotationVelocity.length() * 2000.0f));
Log.d("Deceleration", "Duration: " + inertia.getDuration());
long duration = (long) (Math.pow(10 * rotationVelocity.length(), 1) * 400);
inertia.setDuration(duration);
inertia.setFunction(new ExponentialFunction(2, duration));
inertia.start();
}

Expand Down

0 comments on commit b579fcf

Please sign in to comment.