Convert an integer to 4 bytes without bitshift operators
There's not a ton that can be improved here, but:


lut should be made const
Due to implicit promotion, lut can be stored as integers instead of floats. Your expressions should evaluate to the same thing.
Consider representing your lut constants in hexadecimal (0x) format - or as 1 &lt;&lt; x notation.
Your lut doesn't strictly need to be an array; you're not iterating over it or indexing it dynamically. As such, you may be better off simply making individually-named constants such as XL, YL, ZL.