Formats latitude
@param out
@param latitude
@param unit
779660
public static void formatLatitude(Appendable out, double latitude, UnitType unit)
    {
        formatLatitude(out, Locale.getDefault(), latitude, unit);
    }
991636
void formatFractionalSeconds(StringBuilder b, ZonedDateTime d, int width) {
    // format up to 9 digits at nanosecond resolution.
    int nano = d.getNano();
    int f = 100000000;
    while (width > 0 && f > 0) {
      int digit = nano / f;
      nano -= (digit * f);
      f /= 10;
      b.append(digit);
      width--;
    }

    // fill out any trailing zeros if any are requested
    while (width > 0) {
      b.append('0');
      width--;
    }
  }
151985
def _format_coordinate(self, ax, m):
        '''  '''
        lon_m, lon_M, lat_m, lat_M = self.window
        xlocs = np.linspace(lon_m, lon_M, 5)
        ylocs = np.linspace(lat_m, lat_M, 5)
        xlocs = map(lambda x: float('%1.2f' % (x)), xlocs)
        ylocs = map(lambda x: float('%1.2f' % (x)), ylocs)
        m.drawparallels(ylocs, labels=[1, 0, 0, 1], ax=ax, fontsize=18)
        m.drawmeridians(xlocs, labels=[1, 0, 0, 1], ax=ax, fontsize=18)
269347
private static Double readLatitude(Object o) {
        if (o == null) {
            return null;
        }
        Double value;
        if (o instanceof Number) {
            value = ((Number) o).doubleValue();
        } else {
            try {
                value = Double.valueOf(o.toString());
            } catch (NumberFormatException e) {
                throw new IndexException("Unparseable latitude: {}", o);
            }
        }
        return GeospatialUtils.checkLatitude("latitude", value);
    }
481446
function (latitude) {
                return Math.log(Math.tan(Math.PI / 4 + (latitude * Angle.DEGREES_TO_RADIANS) / 2)) / Math.PI;
            }
803771
private void writeOutbound(Definition def, Writer out, int indent) throws IOException
   {
      writeIndent(out, indent);
      out.write("<managedconnectionfactory-class>" + def.getRaPackage() + "." +
            def.getMcfDefs().get(0).getMcfClass() + "</managedconnectionfactory-class>");
      writeEol(out);
      writeEol(out);

      if (!def.getMcfDefs().get(0).isUseCciConnection())
      {
         writeIndent(out, indent);
         out.write("<connectionfactory-interface>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getCfInterfaceClass() + "</connectionfactory-interface>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connectionfactory-impl-class>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getCfClass() + "</connectionfactory-impl-class>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connection-interface>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getConnInterfaceClass() + "</connection-interface>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connection-impl-class>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getConnImplClass() + "</connection-impl-class>");
         writeEol(out);
      }
      else
      {
         writeIndent(out, indent);
         out.write("<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connectionfactory-impl-class>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getCciConnFactoryClass() + "</connectionfactory-impl-class>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connection-interface>javax.resource.cci.Connection</connection-interface>");
         writeEol(out);
         writeIndent(out, indent);
         out.write("<connection-impl-class>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(0).getCciConnClass() + "</connection-impl-class>");
         writeEol(out);
      }

      writeEol(out);
      writeIndent(out, indent);
      out.write("<transaction-support>" + def.getSupportTransaction() + "</transaction-support>");
      writeEol(out);

      writeConfigPropsXml(def.getMcfDefs().get(0).getMcfConfigProps(), out, indent);

      writeIndent(out, indent);
      out.write("<reauthentication-support>" + def.isSupportReauthen() + "</reauthentication-support>");
      writeEol(out);
   }
1071133
private static String formatProperties(ArgumentUnit argumentUnit)
    {
		final StringBuilder sb = new StringBuilder("Properties:" + System.lineSeparator());

		final Properties properties = ArgumentUnitUtils.getProperties(argumentUnit);
		for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
			if (entry.getValue() != null) {
				sb.append("   ");
				sb.append(entry.getKey());
				sb.append(": ");
				sb.append(entry.getValue());
				sb.append(System.lineSeparator());
			}
		}

		return sb.toString();
    }
686570
def latitude(self, value):
        """"""
        self._latitude = math.radians(float(value))
        assert -self.PI / 2 <= self._latitude <= self.PI / 2, \
            "latitude value should be between -90..90."
126151
public static String createLabel(final double value, final String unit, final GridLabelFormat format) {
        final double zero = 0.000000001;
        if (format != null) {
            return format.format(value, unit);
        } else {
            if (Math.abs(value - Math.round(value)) < zero) {
                return String.format("%d %s", Math.round(value), unit);
            } else if ("m".equals(unit)) {
                // meter: no decimals
                return String.format("%1.0f %s", value, unit);
            } else if (NonSI.DEGREE_ANGLE.toString().equals(unit)) {
                // degree: by default 6 decimals
                return String.format("%1.6f %s", value, unit);
            } else {
                return String.format("%f %s", value, unit);
            }
        }
    }
720115
public static Double checkLatitude(String name, Double latitude) {
        if (latitude == null) {
            throw new IndexException("{} required", name);
        } else if (latitude < MIN_LATITUDE || latitude > MAX_LATITUDE) {
            throw new IndexException("{} must be in range [{}, {}], but found {}",
                                     name,
                                     MIN_LATITUDE,
                                     MAX_LATITUDE,
                                     latitude);
        }
        return latitude;
    }
856239
public void formatTo(Formatter formatter, int flags, int width,
			int precision)
	{
		formatTo(this.toString(), formatter, flags, width, precision);
	}
150289
private void writeOutbound(Definition def, Writer out, int indent) throws IOException
   {
      writeIndent(out, indent);
      out.write("<outbound-resourceadapter>");
      writeEol(out);

      for (int num = 0; num < def.getMcfDefs().size(); num++)
      {

         writeIndent(out, indent + 1);
         out.write("<connection-definition>");
         writeEol(out);
         writeIndent(out, indent + 2);
         out.write("<managedconnectionfactory-class>" + def.getRaPackage() + "." +
               def.getMcfDefs().get(num).getMcfClass() + "</managedconnectionfactory-class>");
         writeEol(out);
         writeConfigPropsXml(def.getMcfDefs().get(num).getMcfConfigProps(), out, indent + 2);

         if (!def.getMcfDefs().get(num).isUseCciConnection())
         {
            writeIndent(out, indent + 2);
            out.write("<connectionfactory-interface>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getCfInterfaceClass() + "</connectionfactory-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connectionfactory-impl-class>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getCfClass() + "</connectionfactory-impl-class>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connection-interface>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getConnInterfaceClass() + "</connection-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connection-impl-class>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getConnImplClass() + "</connection-impl-class>");
            writeEol(out);
         }
         else
         {
            writeIndent(out, indent + 2);
            out.write("<connectionfactory-interface>javax.resource.cci.ConnectionFactory"
                  + "</connectionfactory-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connectionfactory-impl-class>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getCciConnFactoryClass() + "</connectionfactory-impl-class>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connection-interface>javax.resource.cci.Connection</connection-interface>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<connection-impl-class>" + def.getRaPackage() + "." +
                  def.getMcfDefs().get(num).getCciConnClass() + "</connection-impl-class>");
            writeEol(out);
         }
         writeIndent(out, indent + 1);
         out.write("</connection-definition>");
         writeEol(out);
      }
      writeIndent(out, indent + 1);
      out.write("<transaction-support>" + def.getSupportTransaction() + "</transaction-support>");
      writeEol(out);

      if (def.getAuthenMechanisms() != null && def.getAuthenMechanisms().size() > 0)
      {
         for (int i = 0; i < def.getAuthenMechanisms().size(); i++)
         {
            writeIndent(out, indent + 1);
            out.write("<authentication-mechanism>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<authentication-mechanism-type>" + def.getAuthenMechanisms().get(i).getAuthMechanism() +
                  "</authentication-mechanism-type>");
            writeEol(out);
            writeIndent(out, indent + 2);
            out.write("<credential-interface>");
            if (def.getAuthenMechanisms().get(i).getCredentialInterface().equals("GSSCredential"))
               out.write("org.ietf.jgss.GSSCredential");
            else
               out.write("javax.resource.spi.security." + def.getAuthenMechanisms().get(i).getCredentialInterface());
            out.write("</credential-interface>");
            writeEol(out);
            writeIndent(out, indent + 1);
            out.write("</authentication-mechanism>");
            writeEol(out);
         }
      }

      writeIndent(out, indent + 1);
      out.write("<reauthentication-support>" + def.isSupportReauthen() + "</reauthentication-support>");
      writeEol(out);
      writeIndent(out, indent);
      out.write("</outbound-resourceadapter>");
      writeEol(out);
   }
694832
public void replace(final int pos, final double latitude, final double longitude) {
        this.longitude[pos] = longitude;
        this.latitude[pos] = latitude;
    }
361909
@Override
	public void formatTo(Formatter formatter, int flags, int width, int precision) {
		formatNodeTo(formatter, 0, root);	
	}
1172156
private static String formatWaypointTargets(Point[] waypointTargets) {
    String[] coordinatesFormatted = new String[waypointTargets.length];
    int index = 0;
    for (Point target : waypointTargets) {
      if (target == null) {
        coordinatesFormatted[index++] = "";
      } else {
        coordinatesFormatted[index++] = String.format(Locale.US, "%s,%s",
          TextUtils.formatCoordinate(target.longitude()),
          TextUtils.formatCoordinate(target.latitude()));
      }
    }
    return TextUtils.join(";", coordinatesFormatted);
  }
924443
public void setInOutPoint(long in, long out)
	{
		// Remove in/out point (we're replacing it)
		removeInOutPoint();

		// Build a new InOutPoints element
		Element filter = buildInOutElement(in, out);

		element.addContent(filter);
	}
351810
private static double latitudeToY(double latitude) {
        double sinLatitude = Math.sin(latitude * (Math.PI / 180));
        return 0.5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI);
    }