You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a computation heavy generic math function that requires Ord, I would rather pass it an OrderedFloat instead of a NotNan since NotNan adds overhead to each computation, unlike OrderedFloat which only incurrs overhead on comparisons.
The pathfinding crate requires at least num_traits::identities::Zero and OrderedFloat does not implement this. Actually, there are several more traits in num_traits that might be useful to someone.
This way you could pass an ordered float to a generic function that requires Add+Ord. Same question for Sub/Mul/Div.
The text was updated successfully, but these errors were encountered: