Merge branch 'main' into entities

This commit is contained in:
MihailRis
2024-06-30 22:16:14 +03:00
17 changed files with 247 additions and 177 deletions
+10
View File
@@ -1,6 +1,8 @@
#ifndef MATHS_UVREGION_HPP_
#define MATHS_UVREGION_HPP_
#include <cmath>
struct UVRegion {
float u1;
float v1;
@@ -11,6 +13,14 @@ struct UVRegion {
: u1(u1), v1(v1), u2(u2), v2(v2){}
UVRegion() : u1(0.0f), v1(0.0f), u2(1.0f), v2(1.0f){}
inline float getWidth() const {
return fabs(u2-u1);
}
inline float getHeight() const {
return fabs(v2-v1);
}
};
#endif // MATHS_UVREGION_HPP_