Package pl.poznan.put.circular.enums
Enum AngleTransformation
- All Implemented Interfaces:
Serializable
,Comparable<AngleTransformation>
,java.lang.constant.Constable
A transformation used to display circular diagrams.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiondouble
transform
(double radians) Transforms an angle value in radians to represent it on circle.static AngleTransformation
Returns the enum constant of this type with the specified name.static AngleTransformation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CLOCK
0 degree is on top, 90 degree is on the right. -
MATH
0 degree is on the right, 90 degree is on top.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
transform
public double transform(double radians) Transforms an angle value in radians to represent it on circle. InMATH
the value is returned as it is, so value 0 is on X-axis and increasing values are drawn counter-clockwise. InCLOCK
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.
-