Class AngleFormat

java.lang.Object
pl.poznan.put.utility.AngleFormat

public final class AngleFormat extends Object
A collection of formatting methods for angular values.
  • Method Details

    • degreesRoundedToOne

      public static String degreesRoundedToOne(double radians)
      Format an angle value given in radians. The method detects NaN and infinity. Values is rounded to the nearest degree.
      Parameters:
      radians - Input value in radians to be formatted.
      Returns:
      A String with the value of input in degrees and a unicode degree symbol.
    • degreesRoundedToHundredth

      public static String degreesRoundedToHundredth(double radians)
      Format an angle value given in radians. The method detects NaN and infinity. Value in degrees is displayed with two digits after comma.
      Parameters:
      radians - Input value in radians to be formatted.
      Returns:
      A String with the value of input in degrees (two digits after comma precision) and a unicode degree symbol.
    • degrees

      public static String degrees(double radians)
      Format an angle value given in radians. The method uses no rounding and displays raw result of Double.toString().
      Parameters:
      radians - Input value in radians to be formatted.
      Returns:
      A String with the value of input in degrees.