Optimize a little bit isBlockInSight, adjustDist & collisions (#7193)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Tue, 3 Apr 2018 22:43:08 +0000 (00:43 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Apr 2018 22:43:08 +0000 (00:43 +0200)
commita90d27e1e23fa1c369c05a4d9c6083aa86ef7f52
tree39f8d58d7ff29ae57a06e4239ae0b49b6dbed050
parent05fe3b06c80fc7fa438ed5faf5805c79a92789e9
Optimize a little bit isBlockInSight, adjustDist & collisions (#7193)

* Use constexpr + unroll some calculations to cache definitively some calculations
* Unroll some calls in collision code & use a constref instead of a copy in one occurence
src/collision.cpp
src/util/numeric.cpp