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
angleclockwise angle of the handle with respect to north/up of 0°.
displacementdistance from the center of the base
-
Convert this report into XY format
Declaration
Swift
public var rectangular: JoyStickViewXYReport { get }
Install in Dash
JoyStickViewPolarReport Structure Reference