1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-02 00:05:26 +01:00

Rewrite broken logic in blit_with_alpha2

This commit is contained in:
sfan5
2025-07-25 12:05:50 +02:00
parent 7345b54f18
commit d679261488
2 changed files with 56 additions and 25 deletions

View File

@@ -126,6 +126,20 @@ inline void sortBoxVerticies(core::vector3d<T> &p1, core::vector3d<T> &p2)
std::swap(p1.Z, p2.Z);
}
template <typename T>
inline constexpr core::vector2d<T> componentwise_min(const core::vector2d<T> &a,
const core::vector2d<T> &b)
{
return {std::min(a.X, b.X), std::min(a.Y, b.Y)};
}
template <typename T>
inline constexpr core::vector2d<T> componentwise_max(const core::vector2d<T> &a,
const core::vector2d<T> &b)
{
return {std::max(a.X, b.X), std::max(a.Y, b.Y)};
}
template <typename T>
inline constexpr core::vector3d<T> componentwise_min(const core::vector3d<T> &a,
const core::vector3d<T> &b)