Angle

public struct Angle

A structure that represents a geometric angle.

  • The angle value in radians.

    Declaration

    Swift

    public var radians: Double
  • The angle value in degrees.

    Declaration

    Swift

    public var degrees: Double { get set }
  • Creates an angle with the specified radians.

    Declaration

    Swift

    public init(radians: Double)

    Parameters

    radians

    The radians of the angle.

  • Creates an angle with the specified degrees.

    Declaration

    Swift

    public init(degrees: Double)

    Parameters

    degrees

    The degrees of the angle.

  • A zero angle.

    Declaration

    Swift

    public static let zero: Angle
  • An angle.

    Declaration

    Swift

    public static func radians(_ radians: Double) -> Angle

    Parameters

    radians

    The radians of the angle.

    Return Value

    A new Angle instance with the specified radians.

  • An angle.

    Declaration

    Swift

    public static func degrees(_ degrees: Double) -> Angle

    Parameters

    degrees

    The degrees of the angle.

    Return Value

    A new Angle instance with the specified degrees.