Created
April 22, 2016 20:17
-
-
Save qmchenry/56583e257b7b2dd2102c97ac6bdfa1e8 to your computer and use it in GitHub Desktop.
Function to compute priorities for all AUNTiOptions and return a sorted Array of options and priorities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static func priorities(values: AUNTiValues) -> [(priority: Float, option: AUNTiOption)] { | |
return all.map{ (priority: values.priority(forOption: $0), option: $0) }.sort{ $0.priority > $1.priority } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment