prxxss
prxxss
CC#
Created by prxxss on 11/9/2024 in #help
✅ Get bytes and append to List c#
No description
41 replies
CC#
Created by prxxss on 11/8/2024 in #help
Get 16 bit floating point precision as a ushort
I saw on SO that using Convert.ToUInt16(2.2) would give me the 16 bit representation of the float, but instead it just gives me 2, what is the proper way to do what i want?
59 replies
CC#
Created by prxxss on 11/7/2024 in #help
Get minimum bytes needed for a number in c#
I have this method in python that gives me the minimum bytes needed for a number
def get_time_byte_size(self, time):
return (time.bit_length() + 7) // 8
def get_time_byte_size(self, time):
return (time.bit_length() + 7) // 8
for a number like 122 it will return 1, and for like 257 it will return 2, so on and so forth
7 replies