JoyStickViewPolarReport

public struct JoyStickViewPolarReport

JoyStickView handle position as angle/displacement values from the base center. Note that angle is given in degrees, with 0° pointing up (north) and 90° pointing right (east).

  • Clockwise angle of the handle with respect to north/up of 0°.

    Declaration

    Swift

    public let angle: CGFloat
  • Distance from the center of the base

    Declaration

    Swift

    public let displacement: CGFloat
  • Constructor of new polar report

    Declaration

    Swift

    public init(angle: CGFloat, displacement: CGFloat)

    Parameters

    angle

    clockwise angle of the handle with respect to north/up of 0°.

    displacement

    distance from the center of the base

  • Convert this report into XY format

    Declaration

    Swift

    public var rectangular: JoyStickViewXYReport { get }