Project

General

Profile

« Previous | Next » 

Revision e4f656d1

Added by Leszek Koltunski over 2 years ago

Simplifications

View differences:

src/main/java/org/distorted/screens/RubikScreenSolution.java
203 203
        int axis      = mMoves[mCurrMove-1][0];
204 204
		    int rowBitmap = mMoves[mCurrMove-1][1];
205 205
		    int bareAngle = mMoves[mCurrMove-1][2];
206
		    int basicAngle= control.getObject().getBasicAngle()[axis];
207
        int angle     = bareAngle*(360/basicAngle);
208
        int duration  = Math.abs(angle)*MILLIS_PER_DEGREE;
209 206

  
210
        if( angle!=0 )
207
        if( bareAngle!=0 )
211 208
          {
212 209
          mCanRotate = false;
213
          control.addRotation(this, axis, rowBitmap, angle, duration);
210
          control.addRotation(this, axis, rowBitmap, bareAngle, MILLIS_PER_DEGREE);
214 211
          }
215 212
        else
216 213
          {
......
242 239
        int axis      = mMoves[mCurrMove][0];
243 240
		    int rowBitmap = mMoves[mCurrMove][1];
244 241
		    int bareAngle = mMoves[mCurrMove][2];
245
        int basicAngle= control.getObject().getBasicAngle()[axis];
246
        int angle     = bareAngle*(360/basicAngle);
247
        int duration  = Math.abs(angle)*MILLIS_PER_DEGREE;
248 242

  
249
        if( angle!=0 )
243
        if( bareAngle!=0 )
250 244
          {
251 245
          mCanRotate = false;
252
          control.addRotation(this, axis, rowBitmap, -angle, duration);
246
          control.addRotation(this, axis, rowBitmap, -bareAngle, MILLIS_PER_DEGREE);
253 247
          }
254 248
        else
255 249
          {

Also available in: Unified diff