Added love.math.gammaToLinear and love.math.linearToGamma for converting RGB color values from the sRGB color-space to linear and vice-versa.

This commit is contained in:
Alex Szpakowski
2014-02-04 19:45:50 -04:00
parent 823b1babc8
commit e54d771be4
4 changed files with 108 additions and 0 deletions
+10
View File
@@ -136,6 +136,16 @@ public:
**/
bool isConvex(const std::vector<Vertex> &polygon);
/**
* Converts a value from the sRGB (gamma) colorspace to linear RGB.
**/
float gammaToLinear(float c) const;
/**
* Converts a value from linear RGB to the sRGB (gamma) colorspace.
**/
float linearToGamma(float c) const;
/**
* Calculate Simplex noise for the specified coordinate(s).
*