JAL-3333 Sorry couldn't resist adding a bit of weighting to the rotation
authorBen Soares <bsoares@dundee.ac.uk>
Sat, 29 Jun 2019 12:48:25 +0000 (13:48 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Sat, 29 Jun 2019 12:48:25 +0000 (13:48 +0100)
src/jalview/gui/WebserviceInfo.java

index 2b85141..0a46600 100644 (file)
@@ -814,7 +814,10 @@ protected void cancel_actionPerformed(ActionEvent e)
 
           int units = (int) ((System.currentTimeMillis() - startTime)
                   / invSpeed);
-          angle += units;
+          double factor = 0.5
+                  + 1.5 * (0.5
+                          - (0.5 * Math.sin(Math.toRadians(angle + 45))));
+          angle += units * factor;
           angle %= 360;
           startTime = System.currentTimeMillis();