FLOATBITSTOINT(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ’– FLOATBITSTOINT(3G) πŸ’–

okay bestie, gather round, because we're doing the 3G manual page for floatBitsToInt and it is lowkey iconic. this one's short, it's sweet, and it's literally just "hey what if your float was secretly an int this whole time". no cap.


✨ NAME ✨

floatBitsToInt β€” produce the encoding of a floating point value as an integer


🌸 DECLARATION 🌸

bestie look at these signatures, they're giving precision:

genIType floatBitsToInt(genType x);

genUType floatBitsToUint(genType x);

πŸŽ€ PARAMETERS πŸŽ€

  • x β€” the value whose floating point encoding you want back. hand it over, we're reading its bits πŸ‘€

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea. floatBitsToInt and floatBitsToUint return the encoding of their floating-point parameters as int or uint, respectively. the floating-point bit-level representation is preserved. that's it, that's the whole vibe β€” no rounding, no converting the number, we're converting the bits. the way that it just hands you the raw encoding, obsessed. 🫢


πŸ‘‘ VERSION SUPPORT πŸ‘‘

the OpenGL Shading Language Version tea, spilled:

  • floatBitsToInt
    • OpenGL Shading Language Version 1.10 β€” -
    • 1.20 β€” -
    • 1.30 β€” -
    • 1.40 β€” -
    • 1.50 β€” -
    • 3.30 β€” βœ”
    • 4.00 β€” βœ”
    • 4.10 β€” βœ”
    • 4.20 β€” βœ”
    • 4.30 β€” βœ”
    • 4.40 β€” βœ”
    • 4.50 β€” βœ”
  • floatBitsToUInt
    • OpenGL Shading Language Version 1.10 β€” -
    • 1.20 β€” -
    • 1.30 β€” -
    • 1.40 β€” -
    • 1.50 β€” -
    • 3.30 β€” βœ”
    • 4.00 β€” βœ”
    • 4.10 β€” βœ”
    • 4.20 β€” βœ”
    • 4.30 β€” βœ”
    • 4.40 β€” βœ”
    • 4.50 β€” βœ”
so basically it's - for 1.10 all the way through 1.50, and then 3.30 shows up and it's βœ” forever after. glow up era. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

  • intBitsToFloat(),
  • uintBitsToFloat

Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

Copyright Β© 2011-2014 Khronos Group


and that's the page, bestie!! this came from [FIXME: source] and it's dated 01/03/2018, and it's the FLOATBITSTOINT(3G) manual, so now you know. go forth and reinterpret your floats. periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from