Enum AngleTransformation

    • Enum Constant Detail

      • 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 Detail

      • values

        public static AngleTransformation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AngleTransformation c : AngleTransformation.values())
            System.out.println(c);
        
        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.