Project

General

Profile

« Previous | Next » 

Revision c7a98f94

Added by Leszek Koltunski over 2 years ago

Minor

View differences:

src/main/java/org/distorted/objects/Movement4.java
22 22
import org.distorted.library.type.Static3D;
23 23

  
24 24
///////////////////////////////////////////////////////////////////////////////////////////////////
25
// Tetrahedral objects: map the 2D swipes of user's fingers to 3D rotations
25 26

  
26 27
abstract class Movement4 extends Movement
27 28
{
......
44 45
    }
45 46

  
46 47
///////////////////////////////////////////////////////////////////////////////////////////////////
48
// Jing has nL=2
47 49

  
48 50
  public float returnRotationFactor(int numLayers, int row)
49 51
    {
50
    return ((float)numLayers)/(numLayers-row);
52
    return numLayers==2 ? 1.0f : ((float)numLayers)/(numLayers-row);
51 53
    }
52 54

  
53 55
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff