average(ofProperty:)
public func average<T: AddableType>(ofProperty property: String) -> T?
Returns the average value of a given property over all the results, or nil if the results are empty.
Warning
Only the name of a property whose type conforms to the AddableType protocol can be specified.
-
Declaration
Swift
public func average<T: AddableType>(ofProperty property: String) -> T?
View on GitHub
Install in Dash
average(ofProperty:) Instance Method Reference