Changeset 3930


Ignore:
Timestamp:
04/16/08 17:28:54 (12 years ago)
Author:
melissa
Message:

Added bytesToDouble.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/DataTools.java

    r3851 r3930  
    398398  } 
    399399 
     400  /**  
     401   * Translates the specified number of bytes of a byte array to a double. 
     402   * If there are fewer than 8 bytes in the array, the MSBs are all assumed 
     403   * to be zero (regardless of endianness). 
     404   */ 
     405  public static double bytesToDouble(byte[] bytes, int offset, int len, 
     406     boolean little)  
     407  { 
     408    return Double.longBitsToDouble(bytesToLong(bytes, offset, len, little)); 
     409  } 
     410 
    400411  /** 
    401412   * Translates the short value into two bytes, and places them in a byte 
Note: See TracChangeset for help on using the changeset viewer.