Project

General

Profile

« Previous | Next » 

Revision bfdb9aa5

Added by Leszek Koltunski over 1 year ago

Finish TouchControl for the Masterball.
detection of the solved staet remains.

View differences:

src/main/java/org/distorted/objectlib/touchcontrol/TouchControlShapeConstant.java
110 110
  private void normalize2D(float[] vect)
111 111
    {
112 112
    float len = (float)Math.sqrt(vect[0]*vect[0] + vect[1]*vect[1]);
113
    vect[0] /= len;
114
    vect[1] /= len;
113

  
114
    if( len!=0.0f )
115
      {
116
      vect[0] /= len;
117
      vect[1] /= len;
118
      }
115 119
    }
116 120

  
117 121
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff