summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-11-20 00:07:46 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2018-11-20 00:07:46 +0100
commitd525e10316422247c77994735843826cdeea7e90 (patch)
treeff6292adf91117543b03e3c4b548552917c14e9b /core/src/ch
parent6a286977f2d696a381670f924f69fdc5589fade2 (diff)
downloadgdx-boardgame-d525e10316422247c77994735843826cdeea7e90.zip
gdx-boardgame-d525e10316422247c77994735843826cdeea7e90.tar.gz
BounceAnimation : use MathUtils
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java b/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java
index d67457a..d3c9009 100644
--- a/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java
+++ b/core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java
@@ -1,8 +1,7 @@
package ch.asynk.gdx.boardgame.animations;
-import java.lang.Math;
-
import com.badlogic.gdx.utils.Pool;
+import com.badlogic.gdx.math.MathUtils;
import ch.asynk.gdx.boardgame.Piece;
@@ -73,7 +72,7 @@ public class BounceAnimation extends TimedAnimation implements Pool.Poolable
@Override protected void update(float delta)
{
- piece.setScale(this.startScale + this.bounceFactor * (float) Math.sin(percent * Math.PI));
+ piece.setScale(this.startScale + this.bounceFactor * (float) MathUtils.sin(percent * MathUtils.PI));
if (rotationDegrees != 0f) {
piece.setRotation(this.startRotation + (percent * this.rotationDegrees));
}