Example usage for org.apache.commons.math3.util CompositeFormat getDefaultNumberFormat

List of usage examples for org.apache.commons.math3.util CompositeFormat getDefaultNumberFormat

Introduction

In this page you can find the example usage for org.apache.commons.math3.util CompositeFormat getDefaultNumberFormat.

Prototype

public static NumberFormat getDefaultNumberFormat() 

Source Link

Document

Create a default number format.

Usage

From source file:org.orekit.bodies.FieldGeodeticPoint.java

@Override
public String toString() {
    final NumberFormat format = CompositeFormat.getDefaultNumberFormat();
    return "{lat: " + format.format(FastMath.toDegrees(getLatitude().getReal())) + " deg, lon: "
            + format.format(FastMath.toDegrees(getLongitude().getReal())) + " deg, alt: "
            + format.format(getAltitude().getReal()) + "}";
}

From source file:org.orekit.bodies.GeodeticPoint.java

@Override
public String toString() {
    final NumberFormat format = CompositeFormat.getDefaultNumberFormat();
    return "{lat: " + format.format(FastMath.toDegrees(this.getLatitude())) + " deg, lon: "
            + format.format(FastMath.toDegrees(this.getLongitude())) + " deg, alt: "
            + format.format(this.getAltitude()) + "}";
}