From 79f0cead0cbb86143d136966a97434fc81c71e1c Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 4 Dec 2016 14:35:47 +0100 Subject: [PATCH] cleanups --- src/yugecin/opsudance/movers/QuadraticBezierMover.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/yugecin/opsudance/movers/QuadraticBezierMover.java b/src/yugecin/opsudance/movers/QuadraticBezierMover.java index bedfd953..e9fe881a 100644 --- a/src/yugecin/opsudance/movers/QuadraticBezierMover.java +++ b/src/yugecin/opsudance/movers/QuadraticBezierMover.java @@ -42,13 +42,7 @@ public class QuadraticBezierMover extends Mover { this.totalTime = end.getTime() - startTime; double startAngle = Math.atan2(startY - p.y, startX - p.x); - double angDiff = Math.atan2(startY - endY, startX - endX) - startAngle; - while (angDiff < 0) angDiff += Math.PI; - while (angDiff > Math.PI) angDiff -= Math.PI; - angDiff -= Math.PI / 2; - if (angDiff < 0) angDiff = -angDiff; double dist = Utils.distance(startX, startY, endX, endY); - //double speed = dist / 10 + dist * (Math.PI - angDiff) / Math.PI; p.x = (int) (startX + Math.cos(startAngle) * prevspeed); p.y = (int) (startY + Math.sin(startAngle) * prevspeed); prevspeed = (dist / totalTime) * aggressiveness;