3 ms·
You might be able to speed it up considerably by adding 2a. Continue with next iteration unless the turning number of the sequence of curves is a whole number.
by fhars 17y ago
You might be able to speed it up considerably by adding
2a. Continue with next iteration unless the turning number of the sequence of curves is a whole number.
You add 1/8 to the turning number for each clockwise curve and subtract 1/8 for each CCW (for numerical stability you would rather add of subtract 1 and check for multiples of 8).