Project

General

Profile

« Previous | Next » 

Revision 7403cdfa

Added by Leszek Koltunski over 3 years ago

Fix rotations of the Helicopter.

View differences:

src/main/java/org/distorted/objects/RubikPyraminx.java
228 228
    return 1;
229 229
    }
230 230

  
231
///////////////////////////////////////////////////////////////////////////////////////////////////
232

  
233
  float getBasicStep()
234
    {
235
    return SQ6/3;
236
    }
237

  
231 238
///////////////////////////////////////////////////////////////////////////////////////////////////
232 239

  
233 240
  int getNumCubitFaces()
......
446 453
    }
447 454

  
448 455
///////////////////////////////////////////////////////////////////////////////////////////////////
449
// I don't quite understand it, but 0.82 works better than the theoretically correct SQ3/2 ( 0.866 )
456
// SQ6/3 = height of the tetrahedron
450 457

  
451 458
  float returnMultiplier()
452 459
    {
453
    return getSize()/0.82f;//(SQ3/2);
460
    return getSize()/(SQ6/3);
454 461
    }
455 462

  
456 463
///////////////////////////////////////////////////////////////////////////////////////////////////
......
487 494
    }
488 495

  
489 496
///////////////////////////////////////////////////////////////////////////////////////////////////
490
// 0.82?? see returnMultiplier()
491 497

  
492 498
  public int computeRowFromOffset(float offset)
493 499
    {
494
    return (int)(getSize()*offset/0.82f);
500
    return (int)(getSize()*offset/(SQ6/3));
495 501
    }
496 502

  
497 503
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff