Code example for DecimalFormat

Methods: format, setDecimalFormatSymbols

0
 
		return sb.toString();
	} 
 
	public static String formatCoord(double coord) {
		DecimalFormat df = new DecimalFormat("###.######");
		df.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.US));
		return df.format(coord);
	} 
	 
	protected void rotateCompass(float angle) {
 
		if(mCompass != null) 
		{ 
			m_dfOrinetAngle = getAzimuth(mAzimuth + mCompass.getAngle() + angle);
		} 
		else 
		{ 
			m_dfOrinetAngle = 0;
		}