I don't agree with a lot of what Jobs did, but he was absolutely right about rounded rectangles.
> Bill's technique used the fact the sum of a sequence of odd numbers is always the next perfect square (For example, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, etc). So he could figure out when to bump the dependent coordinate value by iterating in a loop until a threshold was exceeded. This allowed QuickDraw to draw ovals very quickly.
Still blows my mind. I have a hankering to try to blind-rewrite this algorithm knowing only the above.
I wouldn't be surprised if that is still the case. Rule of thumb is that sqrt is on the order of 10x as expensive as integer addition, though this obviously depends on a lot of factors.
I don't agree with a lot of what Jobs did, but he was absolutely right about rounded rectangles.
> Bill's technique used the fact the sum of a sequence of odd numbers is always the next perfect square (For example, 1 + 3 = 4, 1 + 3 + 5 = 9, 1 + 3 + 5 + 7 = 16, etc). So he could figure out when to bump the dependent coordinate value by iterating in a loop until a threshold was exceeded. This allowed QuickDraw to draw ovals very quickly.
Still blows my mind. I have a hankering to try to blind-rewrite this algorithm knowing only the above.