UInt32를 float형으로 변환 / float를 UInt32형으로 변환
static public UInt32 float_to_UInt32(float f) { byte[] a = System.BitConverter.GetBytes(f); return BitConverter.ToUInt32(a, 0); } static public float UInt32_to_float(UInt32 u32) { byte[] a = System.BitConverter.GetBytes(u32); return BitConverter.ToSingle(a, 0); }
C#
2022. 6. 14. 21:22