© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Get 16 bit floating point precision as a ushort - C#
C
C#
•
2y ago
•
58 replies
daikirai
Get 16 bit floating point precision as a ushort
I saw on SO that using
Convert.ToUInt16(2.2)
Convert.ToUInt16(2.2)
would give me the 16 bit representation of the float
, but instead it just gives me
2
2
, what is the proper way to do what i want
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,470
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Next page
Similar Threads
❔ force a ushort value?
C
C# / help
4y ago
✅ Addition with integers and floating point numbers
C
C# / help
2y ago
❔ How can I save a byte in a ushort?
C
C# / help
4y ago
How to build a form using a figma/mockup as my starting point?
C
C# / help
6mo ago