ftsf / nico

a Game Framework in Nim inspired by Pico-8.
MIT License
624 stars 35 forks source link

Rotation with 3 shears #117

Open scambier opened 1 year ago

scambier commented 1 year ago

This is an implementation of the 3-shears rotation algorithm. The idea is succinctly explained here, and I based my implementation on this Medium post.

Differences with the fastRot implementation:

I added the algorithm in the benchmarks list, and you can swap between the 2 functions in examples/rotation.nim