mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Clean up numeric.h and split FacePositionCache from it
I also optiized FacePositionCache a bit: I removed a map lookup and vector copy from both branches of getFacePosition.
This commit is contained in:
parent
b6f4a9c7e1
commit
77597c4ff3
17 changed files with 205 additions and 157 deletions
|
@ -20,14 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#ifndef BASICMACROS_HEADER
|
||||
#define BASICMACROS_HEADER
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#define ARRLEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#define MYMIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
#define MYMAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
// Requires <algorithm>
|
||||
#define CONTAINS(c, v) (std::find((c).begin(), (c).end(), (v)) != (c).end())
|
||||
|
||||
// To disable copy constructors and assignment operations for some class
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue