Treehopper C++ API
Utility.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Libraries/Treehopper.Libraries.h
"
4
#include <math.h>
5
6
namespace
Treehopper
{
7
namespace
Libraries {
8
namespace
Displays {
9
class
LIBRARIES_API
Utility
{
10
public
:
19
static
double
brightnessToCieLuminance
(
double
brightness) {
20
if
(brightness > 0.008856)
21
return
((15625 * pow(brightness, 3)) + (7500 * pow(brightness, 2)) + (1200 * brightness) + 64) /
22
24389.0;
23
else
24
return
1000 * brightness / 9033.0;
25
}
26
};
27
}
28
}
29
}
Treehopper::Libraries::Displays::Utility
Definition:
Utility.h:9
LIBRARIES_API
#define LIBRARIES_API
Definition:
Treehopper.Libraries.h:17
Treehopper
Definition:
AdcPin.h:3
Treehopper.Libraries.h
Treehopper::Libraries::Displays::Utility::brightnessToCieLuminance
static double brightnessToCieLuminance(double brightness)
Returns the CIE 1976 relative luminance calculated from an input intensity (brightness) ...
Definition:
Utility.h:19
C++
API
inc
Libraries
Displays
Utility.h