* Starting on filling in documentation. * First pass on most/all files * more descriptions filled in * Some documentation but TBH the author would be better suited to explain how this works! * more basic stuff filled in * Add a description and bunch of discussion text for most of the view `body` declarations * more explanations Co-authored-by: Dan Wood <danwood@users.noreply.github.com>
20 lines
441 B
Swift
20 lines
441 B
Swift
import Foundation
|
|
|
|
extension Array where Element == ColorGradient {
|
|
|
|
/// <#Description#>
|
|
/// - Parameter index: offset in data table
|
|
/// - Returns: <#description#>
|
|
func rotate(for index: Int) -> ColorGradient {
|
|
if self.isEmpty {
|
|
return ColorGradient.orangeBright
|
|
}
|
|
|
|
if self.count <= index {
|
|
return self[index % self.count]
|
|
}
|
|
|
|
return self[index]
|
|
}
|
|
}
|