// // Created by David Hackbarth on 27.02.26. // #ifndef MISC_STRUCTS_ENUMS_UNIONS_H #define MISC_STRUCTS_ENUMS_UNIONS_H #include struct Vector3 { // public float x, y, z; bool operator==(const Vector3 &other) const { return x == other.x && y == other.y && z == other.z; } bool operator!=(const Vector3 &other) const { return !(*this == other); } bool operator<(const Vector3 &other) const { return x < other.x && y < other.y && z < other.z; } bool operator<=(const Vector3 &other) const { return *this < other || *this == other; } bool operator>(const Vector3 &other) const { return !(*this <= other); } bool operator>=(const Vector3 &other) const { return !(*this < other); } private: // private }; std::ostream& operator<<(std::ostream& os, const Vector3& v) { os << "(" << v.x << "/" << v.y << "/" << v.z << ")"; return os; } enum Weekdays { Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7, FORCE_DWORD = 0x7fffffff // DWORD -> double word -> unsigned 32bit, word -> unsigned 16bit }; union ScreenSize { unsigned int value; // 32bit struct { unsigned short width; // first 16bit unsigned short height; // second 16bit } u; struct { unsigned short width; // first 16bit unsigned short height; // second 16bit } _; }; #endif //MISC_STRUCTS_ENUMS_UNIONS_H