5 ms·
Very cool, If it isn't mentioned elsewhere I'd add a note that often times you can avoid the expensive sqrt calculation. For example the last if statement in h
by nickpow43 3y ago
Very cool, If it isn't mentioned elsewhere I'd add a note that often times you can avoid the expensive sqrt calculation. For example the last if statement in
https://www.jeffreythompson.org/collision-detection/circle-rect.php https://www.jeffreythompson.org/collision-detection/circle-r...
could be optimized by instead just checking if distanceSqr < (radius * radius)