SliceCalculating

protocol SliceCalculating

Slice calculation protocol

  • Slices

    Declaration

    Swift

    var slices: [Slice] { get set }
  • sliceDegree Extension method

    Slice degree

    Declaration

    Swift

    var sliceDegree: CGFloat { get }
  • theta Extension method

    Theta

    Declaration

    Swift

    var theta: CGFloat { get }
  • computeRadian(from:) Extension method

    Calculates radion for index

    Declaration

    Swift

    func computeRadian(from finishIndex: Int) -> CGFloat

    Parameters

    finishIndex

    index

    Return Value

    radian

  • index(fromAngle:) Extension method

    Calculates index for selected angle

    Declaration

    Swift

    func index(fromAngle angle: CGFloat) -> Int

    Parameters

    angle

    Angle degree

    Return Value

    Index

  • segmentHeight(radius:) Extension method

    Segment height

    Declaration

    Swift

    func segmentHeight(radius: CGFloat) -> CGFloat

    Parameters

    radius

    Radius

    Return Value

    Segment height