Find the "leftmost" turn in a particular direction, i.e. the one with the highest left angle, or the lowest right angle if there are no left turns possible.
@param from The edge we're turning from.
@param candidates The set of edges we could turn into.
Find the "rightmost" turn in a particular direction, i.e. the one with the highest right angle, or the lowest left angle if there are no right turns possible.
@param from The edge we're turning from.
@param candidates The set of edges we could turn into.
Find the "best" turn in a particular direction. If left turns are preferred then the "best" turn is the one with the highest left angle, or the lowest right angle. For right turns, the "best" is the one with the highest right angle or the lowest left angle.
@param from The edge we're turning from.
@param candidates The set of edges we could turn into.
@param preferLeft Whether to prefer left turns or not.