MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / toLinear

Method toLinear

source/core/StarColor.cpp:438–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438float Color::toLinear(float in) {
439 const float a = 0.055f;
440 if (in <= 0.04045f)
441 return in / 12.92f;
442 return powf((in + a) / (1.0f + a), 2.4f);
443}
444
445float Color::fromLinear(float in) {
446 const float a = 0.055f;

Callers 1

Calls 1

convertToLinearMethod · 0.80

Tested by

no test coverage detected