Want more features on Pastebin? Sign Up, it's FREE!
Guest

Pavel

By: a guest on Mar 28th, 2013  |  syntax: Java  |  size: 0.74 KB  |  views: 129  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }
clone this paste RAW Paste Data