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

Method fromUint32

source/core/StarColor.cpp:87–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87Color Color::fromUint32(uint32_t v) {
88 Color c;
89 c.setAlpha(((uint8_t*)(&v))[3]);
90 c.setRed(((uint8_t*)(&v))[2]);
91 c.setGreen(((uint8_t*)(&v))[1]);
92 c.setBlue(((uint8_t*)(&v))[0]);
93 return c;
94}
95
96Color Color::temperature(float temp) {
97 // Magic numbers ahoy!

Callers

nothing calls this directly

Calls 4

setAlphaMethod · 0.80
setRedMethod · 0.80
setGreenMethod · 0.80
setBlueMethod · 0.80

Tested by

no test coverage detected