Interface Angle


@NullMarked public sealed interface Angle
Represents an angle that can be relative or absolute.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Angle
    absolute(float degrees)
    Creates a new absolute angle with the specified value.
    float
    Retrieves the value of the angle, measured in degrees.
    boolean
    Determines whether the angle is relative or absolute.
    static Angle
    relative(float degrees)
    Creates a new relative angle with the specified value.
  • Method Details

    • absolute

      static Angle absolute(float degrees)
      Creates a new absolute angle with the specified value. Absolute angles are regardless of the current orientation.
      Parameters:
      degrees - the angle value, measured in degrees
      Returns:
      a new Angle instance with the specified value
    • relative

      static Angle relative(float degrees)
      Creates a new relative angle with the specified value. Relative angles are relative to the current orientation.
      Parameters:
      degrees - the angle value, measured in degrees
      Returns:
      a new Angle instance with the specified value
    • degrees

      float degrees()
      Retrieves the value of the angle, measured in degrees.
      Returns:
      the angle value in degrees
    • relative

      boolean relative()
      Determines whether the angle is relative or absolute.
      Returns:
      true if the angle is relative, false if it is absolute