summaryrefslogtreecommitdiff
path: root/include/cglm/struct/color.h
blob: 3ce78dae4abdb1a5ed917ea91a493e5c74bdfa78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright (c), Recep Aslantas.
 *
 * MIT License (MIT), http://opensource.org/licenses/MIT
 * Full license can be found in the LICENSE file
 */

#ifndef cglms_colors_h
#define cglms_colors_h

#include "../common.h"
#include "../types-struct.h"
#include "../color.h"
#include "vec3.h"

/*!
 * @brief averages the color channels into one value
 *
 * @param[in]  rgb RGB color
 */
CGLM_INLINE
float
glms_luminance(vec3s rgb) {
  return glm_luminance(rgb.raw);
}

#endif /* cglms_colors_h */