Project

General

Profile

« Previous | Next » 

Revision 47ba5ddc

Added by Leszek Koltunski over 4 years ago

RubikCube: further fixes

View differences:

src/main/java/org/distorted/effect/scramble/ScrambleEffectRotations.java
38 38
  {
39 39
  private Random mRnd = new Random(0);
40 40

  
41
///////////////////////////////////////////////////////////////////////////////////////////////////
42

  
43
  private Static4D generateNewRandomPoint()
44
    {
45
    float x = mRnd.nextFloat();
46
    float y = mRnd.nextFloat();
47
    float z = mRnd.nextFloat();
48
    float w = mRnd.nextFloat();
49

  
50
    float len = (float)Math.sqrt(x*x + y*y + z*z + w*w);
51

  
52
    return new Static4D( x/len, y/len, z/len, w/len);
53
    }
54

  
41 55
///////////////////////////////////////////////////////////////////////////////////////////////////
42 56

  
43 57
  public void createEffects(int duration)
......
69 83
    mCubeEffects[1] = new MatrixEffectMove(d0);
70 84
    }
71 85

  
72
///////////////////////////////////////////////////////////////////////////////////////////////////
73

  
74
  private Static4D generateNewRandomPoint()
75
    {
76
    float x = mRnd.nextFloat();
77
    float y = mRnd.nextFloat();
78
    float z = mRnd.nextFloat();
79
    float w = mRnd.nextFloat();
80

  
81
    float len = (float)Math.sqrt(x*x + y*y + z*z + w*w);
82

  
83
    return new Static4D( x/len, y/len, z/len, w/len);
84
    }
85

  
86 86
///////////////////////////////////////////////////////////////////////////////////////////////////
87 87

  
88 88
  public void effectFinishedPlugin(final long effectID)

Also available in: Unified diff