Enum AngleTransformation

java.lang.Object
java.lang.Enum<AngleTransformation>
pl.poznan.put.circular.enums.AngleTransformation
All Implemented Interfaces:
Serializable, Comparable<AngleTransformation>, java.lang.constant.Constable

public enum AngleTransformation extends Enum<AngleTransformation>
A transformation used to display circular diagrams.
  • Enum Constant Details

    • CLOCK

      public static final AngleTransformation CLOCK
      0 degree is on top, 90 degree is on the right.
    • MATH

      public static final AngleTransformation MATH
      0 degree is on the right, 90 degree is on top.
  • Method Details

    • values

      public static AngleTransformation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AngleTransformation valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • transform

      public double transform(double radians)
      Transforms an angle value in radians to represent it on circle. In MATH the value is returned as it is, so value 0 is on X-axis and increasing values are drawn counter-clockwise. In CLOCK the value is transformed such that 0 is at the top of the circle and the increasing values are drawn clockwise.
      Parameters:
      radians - Value in radians to be transformed.
      Returns:
      A transformed value in radians to be drawn on a circle.