SHARE
TWEET

Pavel

a guest Mar 28th, 2013 135 Never
  1. ItemModel(final Item item, final double arcStartR, final double arcEndR,
  2.         final float arcStartD, final float arcEndD)
  3.     {
  4.       this.mItem = item;
  5.  
  6.       this.mArcStartR = arcStartR;
  7.       this.mArcEndR = arcEndR;
  8.  
  9.       this.mArcStartD = arcStartD;
  10.       this.mArcEndD = arcEndD;
  11.  
  12.       this.mArcStartSin = Math.sin(mArcStartR);
  13.       this.mArcStartCos = Math.cos(mArcStartR);
  14.  
  15.       this.mArcEndSin = Math.sin(mArcEndR);
  16.       this.mArcEndCos = Math.cos(mArcEndR);
  17.      
  18.       // ----------->
  19.       double diff = Math.abs(Math.abs(this.mArcStartCos) - Math.abs(this.mArcEndCos));
  20.       if ( diff <= 0.0001 )
  21.       {
  22.         this.mArcStartCos = -1.0;
  23.         this.mArcEndCos = 1.0;
  24.       }
  25.        // ----------->
  26.     }
RAW Paste Data
Top