33 red(std::move(a_rhs.red)),
34 green(std::move(a_rhs.green)),
35 blue(std::move(a_rhs.blue))
38 constexpr
NiColor(
float a_red,
float a_green,
float a_blue) noexcept :
48 if (
this != std::addressof(a_rhs)) {
58 if (
this != std::addressof(a_rhs)) {
59 red = std::move(a_rhs.red);
60 green = std::move(a_rhs.green);
61 blue = std::move(a_rhs.blue);
70 for (std::size_t i = 0; i <
kTotal; ++i) {
71 if (a_lhs[i] != a_rhs[i]) {
80 return !(a_lhs == a_rhs);
83 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
86 return std::addressof(
red)[a_idx];
89 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
92 return std::addressof(
red)[a_idx];
98 for (std::size_t i = 0; i <
kTotal; ++i) {
106 for (std::size_t i = 0; i <
kTotal; ++i) {
115 for (std::size_t i = 0; i <
kTotal; ++i) {
123 for (std::size_t i = 0; i <
kTotal; ++i) {
134 static_assert(
sizeof(
NiColor) == 0xC);
164 red(std::move(a_rhs.red)),
165 green(std::move(a_rhs.green)),
166 blue(std::move(a_rhs.blue)),
167 alpha(std::move(a_rhs.alpha))
170 constexpr
NiColorA(
float a_red,
float a_green,
float a_blue,
float a_alpha) noexcept :
181 if (
this != std::addressof(a_rhs)) {
192 if (
this != std::addressof(a_rhs)) {
193 red = std::move(a_rhs.red);
194 green = std::move(a_rhs.green);
195 blue = std::move(a_rhs.blue);
196 alpha = std::move(a_rhs.alpha);
205 for (std::size_t i = 0; i <
kTotal; ++i) {
206 if (a_lhs[i] != a_rhs[i]) {
215 return !(a_lhs == a_rhs);
218 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
221 return std::addressof(
red)[a_idx];
224 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
227 return std::addressof(
red)[a_idx];
233 for (std::size_t i = 0; i <
kTotal; ++i) {
241 for (std::size_t i = 0; i <
kTotal; ++i) {
250 for (std::size_t i = 0; i <
kTotal; ++i) {
258 for (std::size_t i = 0; i <
kTotal; ++i) {
270 static_assert(
sizeof(
NiColorA) == 0x10);
Definition: NiColor.h:137
float alpha
Definition: NiColor.h:268
constexpr friend bool operator!=(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:213
~NiColorA() noexcept=default
constexpr NiColorA() noexcept
Definition: NiColor.h:149
constexpr friend bool operator==(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:203
constexpr NiColorA & operator=(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:179
NiColorA & operator/=(float a_value) noexcept
Definition: NiColor.h:256
constexpr NiColorA & operator=(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:190
float blue
Definition: NiColor.h:267
constexpr NiColorA(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:163
float red
Definition: NiColor.h:265
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:224
NiColorA & operator*=(float a_value) noexcept
Definition: NiColor.h:239
@ kTotal
Definition: NiColor.h:146
@ kRed
Definition: NiColor.h:141
@ kBlue
Definition: NiColor.h:143
@ kAlpha
Definition: NiColor.h:144
@ kGreen
Definition: NiColor.h:142
constexpr NiColorA(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:156
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:218
NiColorA operator/(float a_value) const noexcept
Definition: NiColor.h:247
constexpr NiColorA(float a_red, float a_green, float a_blue, float a_alpha) noexcept
Definition: NiColor.h:170
NiColorA operator*(float a_value) const noexcept
Definition: NiColor.h:230
float green
Definition: NiColor.h:266
constexpr NiColor(NiColor &&a_rhs) noexcept
Definition: NiColor.h:32
NiColor & operator*=(float a_value) noexcept
Definition: NiColor.h:104
float red
Definition: NiColor.h:130
constexpr NiColor & operator=(NiColor &&a_rhs) noexcept
Definition: NiColor.h:56
float green
Definition: NiColor.h:131
float blue
Definition: NiColor.h:132
~NiColor() noexcept=default
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:89
@ kBlue
Definition: NiColor.h:15
@ kGreen
Definition: NiColor.h:14
@ kRed
Definition: NiColor.h:13
@ kTotal
Definition: NiColor.h:17
constexpr friend bool operator==(const NiColor &a_lhs, const NiColor &a_rhs) noexcept
Definition: NiColor.h:68
NiColor operator/(float a_value) const noexcept
Definition: NiColor.h:112
constexpr NiColor(const NiColor &a_rhs) noexcept
Definition: NiColor.h:26
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:83
constexpr NiColor & operator=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:46
NiColor & operator/=(float a_value) noexcept
Definition: NiColor.h:121
constexpr friend bool operator!=(const NiColor &a_lhs, const NiColor &a_rhs) noexcept
Definition: NiColor.h:78
constexpr NiColor(float a_red, float a_green, float a_blue) noexcept
Definition: NiColor.h:38
NiColor operator*(float a_value) const noexcept
Definition: NiColor.h:95
constexpr NiColor() noexcept
Definition: NiColor.h:20
Definition: AbsorbEffect.h:6