'Unity3D - C# replacement for Unsafe.As

A C# VorbisOGG encoder is using this code...

 public static float ToDecibel(this float x)
   {
       var i = Unsafe.As<float, uint>(ref x);
       i &= 0x7fffffff;
       return i * 7.17711438e-7f - 764.6161886f;
   }

But Unity 3D does not know Unsafe.As()! How can I rewrite this? I tried different stuff, but I do not understand, what this command is doing. Taking the raw bytes and transform to an int?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source