7#include "../rapid/numeric_array.hpp"
8#include "../geometry/matrix.hpp"
9#include "../geometry/scale.hpp"
11namespace hi::inline
v1 {
13[[nodiscard]]
constexpr matrix3
14color_primaries_to_RGBtoXYZ(
float wx,
float wy,
float rx,
float ry,
float gx,
float gy,
float bx,
float by)
noexcept
16 hilet w = vector3{wx, wy, 1.0f - wx - wy};
17 hilet r = vector3{rx, ry, 1.0f - rx - ry};
18 hilet g = vector3{gx, gy, 1.0f - gx - gy};
19 hilet b = vector3{bx, by, 1.0f - bx - by};
22 hilet W = vector3{1.0f * (w.x() / w.y()), 1.0f, 1.0f * (w.z() / w.y())};
25 hilet C = matrix3{r, g, b};
28 hilet S = scale3{~C * W};
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:15