benilla-re systems structs docs

s_double3f70101010101010

global · ui

Address
0x804578 · 8 bytes, up to 0x80457f
Type
const double
Meaning
Holds the double 0.00392156862745098 (0x3f70101010101010)
Confidence
verified, proof one
Finding
ui/colorselect#reading-the-colour

Finding: Reading the colour in ui: ColorSelect

OnColorSelect gets the colour as red, green and blue, and GetColorRGB returns the same three: the colour converted back to channels, each made a byte by adding 512 to v·255, rounding the sum to a float and keeping its integer part, then divided by 255. The float holds the sum to the nearest 1/16384, so a channel can read back one step below what SetColorRGB stored, and one within 1/32768 below a whole step reads back as that step. GetColorHSV returns the three fields as they are. A grey colour has no hue: converting one with saturation 0 stores the hue −1, so after SetColorRGB of a grey GetColorHSV returns −1 as the hue.

The derivation is in the doc.