JoyStickViewXYReport

public struct JoyStickViewXYReport

JoyStickView handle position as X, Y deltas from the base center. Note that here a positive y indicates that the joystick handle is pushed upwards.

  • x

    Delta X of handle from base center

    Declaration

    Swift

    public let x: CGFloat
  • y

    Delta Y of handle from base center

    Declaration

    Swift

    public let y: CGFloat
  • Constructor of new XY report

    Declaration

    Swift

    public init(x: CGFloat, y: CGFloat)

    Parameters

    x

    X offset from center of the base

    y

    Y offset from center of the base (positive values towards up/north)

  • Convert this report into polar format

    Declaration

    Swift

    public var polar: JoyStickViewPolarReport { get }