feat(vector): add CImVector

This commit is contained in:
fallenoak 2022-12-24 17:04:44 -06:00 committed by GitHub
parent 785c612610
commit e960598699
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#ifndef TEMPEST_VECTOR_C_IMVECTOR_HPP
#define TEMPEST_VECTOR_C_IMVECTOR_HPP
#include <cstdint>
class CImVector {
public:
// Static functions
static uint32_t MakeARGB(uint8_t a, uint8_t r, uint8_t g, uint8_t b);
// Member variables
union {
struct {
uint8_t b;
uint8_t g;
uint8_t r;
uint8_t a;
};
uint32_t value;
};
// Member functions
bool operator==(const CImVector& color);
void Set(float a, float r, float g, float b);
};
#endif