Changeset 3044 for trunk


Ignore:
Timestamp:
08/03/07 19:47:26 (13 years ago)
Author:
curtis
Message:

Return 1 for default pixel/domain multiplier.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/overlays/OverlayUtil.java

    r3015 r3044  
    773773   */ 
    774774  public static float getMultiplier(DisplayImpl display) { 
    775     // This method may be a bit naive, obtaining the multiplier from 
    776     // only one measurement. 
     775    // NB: This method may be a bit naive, 
     776    // obtaining the multiplier from only one measurement. 
    777777    int[] p1 = {0, 0}; 
    778778    int[] p2 = {0, 1000}; 
     
    785785    double pp = Math.sqrt(px * px + py * py); 
    786786    double dd = Math.sqrt(dx * dx + dy * dy); 
    787     return (float) (dd / pp); 
     787    float mult = (float) (dd / pp); 
     788    return mult == mult ? mult : 1; 
    788789  } 
    789790 
     
    10511052        // System.out.print("left pt: "); print(leftPt); 
    10521053        // System.out.println("orientation changed = "  + orientationChanged); 
    1053       } // end else // TEMP 
     1054      } // end else 
    10541055 
    10551056      // copy calculated values to storage arrays 
Note: See TracChangeset for help on using the changeset viewer.