From d525e10316422247c77994735843826cdeea7e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 20 Nov 2018 00:07:46 +0100 Subject: BounceAnimation : use MathUtils --- core/src/ch/asynk/gdx/boardgame/animations/BounceAnimation.java | 5 ++--- 1 file 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)); } -- cgit v1.1-2-g2b99