colour: remove redundant rgba member variables
This commit is contained in:
parent
7ef4cbcc1a
commit
75156cedc3
@ -32,11 +32,6 @@ namespace util {
|
|||||||
struct colour : public detail::coord<4, T> {
|
struct colour : public detail::coord<4, T> {
|
||||||
using detail::coord<4,T>::coord;
|
using detail::coord<4,T>::coord;
|
||||||
|
|
||||||
T r;
|
|
||||||
T g;
|
|
||||||
T b;
|
|
||||||
T a;
|
|
||||||
|
|
||||||
static const colour WHITE;
|
static const colour WHITE;
|
||||||
static const colour BLACK;
|
static const colour BLACK;
|
||||||
static const colour RED;
|
static const colour RED;
|
||||||
|
@ -5,6 +5,7 @@ TEST_BIN = \
|
|||||||
backtrace \
|
backtrace \
|
||||||
bitwise \
|
bitwise \
|
||||||
checksum \
|
checksum \
|
||||||
|
colour \
|
||||||
float \
|
float \
|
||||||
hton \
|
hton \
|
||||||
ip \
|
ip \
|
||||||
|
16
test/colour.cpp
Normal file
16
test/colour.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "colour.hpp"
|
||||||
|
|
||||||
|
#include "debug.hpp"
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int, char**)
|
||||||
|
{
|
||||||
|
CHECK_EQ (&util::colour4f::WHITE.x,
|
||||||
|
&util::colour4f::WHITE.r);
|
||||||
|
|
||||||
|
CHECK_EQ (util::colour4f::WHITE.x, 1.f);
|
||||||
|
CHECK_EQ (util::colour4f::WHITE.r, 1.f);
|
||||||
|
CHECK_EQ (util::colour4f::WHITE.g, 1.f);
|
||||||
|
CHECK_EQ (util::colour4f::WHITE.b, 1.f);
|
||||||
|
CHECK_EQ (util::colour4f::WHITE.a, 1.f);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user