mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Minimap: Optimise
This commit is contained in:
parent
ab371cc934
commit
25a24c0cdf
3 changed files with 54 additions and 75 deletions
|
@ -149,6 +149,16 @@ inline void sortBoxVerticies(v3s16 &p1, v3s16 &p2) {
|
|||
SWAP(s16, p1.Z, p2.Z);
|
||||
}
|
||||
|
||||
inline v3s16 componentwise_min(const v3s16 &a, const v3s16 &b)
|
||||
{
|
||||
return v3s16(MYMIN(a.X, b.X), MYMIN(a.Y, b.Y), MYMIN(a.Z, b.Z));
|
||||
}
|
||||
|
||||
inline v3s16 componentwise_max(const v3s16 &a, const v3s16 &b)
|
||||
{
|
||||
return v3s16(MYMAX(a.X, b.X), MYMAX(a.Y, b.Y), MYMAX(a.Z, b.Z));
|
||||
}
|
||||
|
||||
|
||||
/** Returns \p f wrapped to the range [-360, 360]
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue