3 ms·
Only if you assume that X+Y never exceeds 9007199254740991 (Number.MAX_SAFE_INTEGER, 2⁵³-1). Also, that algorithm has nothing in common with the image rotation
by teddyh 5y ago
Only if you assume that X+Y never exceeds 9007199254740991 (Number.MAX_SAFE_INTEGER, 2⁵³-1).
Also, that algorithm has nothing in common with the image rotation one; the image rotation algorithm does require a temporary buffer.