Example #1
0
        public float ReadFloat()
        {
            IntFloatUnion ifu = new IntFloatUnion();

            ifu.i = IPAddress.NetworkToHostOrder(br.ReadInt32());
            return(ifu.f);
        }
Example #2
0
        public void WriteFloat(float _v)
        {
            IntFloatUnion ifu = new IntFloatUnion();

            ifu.f = _v;
            WriteInt(ifu.i);
        }
Example #3
0
        public static int FloatAsInt(float value)
        {
            IntFloatUnion u = new IntFloatUnion {
                b = value
            };

            return(u.a);
        }
Example #4
0
        public static float IntAsFloat(int value)
        {
            IntFloatUnion u = new IntFloatUnion {
                a = value
            };

            return(u.b);
        }