Functionally that seems reasonable. IMO it wouldn't be a problem to call the Double variant `stride(through:by:)` to match the integer form. Just for fun, you could simplify the condition here:
if stride > 0.0 ? current >= end : current <= end {
by using 'if signbit(current - end) == signbit(stride)' instead.
-Joe
···
On Feb 27, 2016, at 6:54 PM, Erica Sadun <erica@ericasadun.com> wrote:
On Feb 27, 2016, at 7:30 PM, Joe Groff via swift-evolution <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:
Forloopians probably don't care whether Float is Strideable, as long as it
has working stride methods. If those methods are better than what they'd
write naively, well, that's even better justification for taking the C loop
away.How about something like fstride.swift · GitHub