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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user