示例#1
0
 /**
  * Check if equator is visible on screen.
  *
  * @return boolean
  */
 public boolean overEquator() {
   LatLonPoint llN = new LatLonPoint.Float();
   inverse(width / 2, 0, llN);
   LatLonPoint llS = new LatLonPoint.Float();
   inverse(width / 2, height, llS);
   return MoreMath.sign(llN.getY()) != MoreMath.sign(llS.getY());
 }
示例#2
0
 /**
  * Reads and returns a long
  *
  * @return the 8 bytes merged into a long, according to the current byte ordering
  * @exception EOFException there were less than 8 bytes left in the file
  * @exception FormatException rethrow of IOExceptions encountered while reading the bytes for the
  *     long
  * @see #read(byte[])
  */
 public long readLong() throws EOFException, FormatException {
   return MoreMath.BuildLong(readBytes(8, false), MSBFirst);
 }
示例#3
0
 /**
  * Reads and returns a long
  *
  * @return the 4 bytes merged into a long, according to the current byte ordering
  * @exception EOFException there were less than 4 bytes left in the file
  * @exception FormatException rethrow of IOExceptions encountered while reading the bytes for the
  *     integer
  * @see #read(byte[])
  */
 public int readInteger() throws EOFException, FormatException {
   // MSBFirst must be set when we are called
   return MoreMath.BuildInteger(readBytes(4, false), MSBFirst);
 }
示例#4
0
 /**
  * Reads and returns a short.
  *
  * @return the 2 bytes merged into a short, according to the current byte ordering
  * @exception EOFException there were less than 2 bytes left in the file
  * @exception FormatException rethrow of IOExceptions encountered while reading the bytes for the
  *     short
  * @see #read(byte[])
  */
 public short readShort() throws EOFException, FormatException {
   // MSBFirst must be set when we are called
   return MoreMath.BuildShort(readBytes(2, false), MSBFirst);
 }