average(ofProperty:)
public func average<T: AddableType>(ofProperty property: String) -> T?
Returns the average value of a given property over all the linking objects, or nil
if the linking objects 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?