Ejemplo n.º 1
0
        public virtual float ReadSingle()
        {
            var r     = (BinaryReader)(object)this;
            var bytes = r.ReadBytes(4);

            var _bytes  = new assets::ScriptCoreLib.JavaScript.WebGL.Uint8Array(bytes);
            var _floats = new assets::ScriptCoreLib.JavaScript.WebGL.Float32Array(_bytes.buffer, 0, 1);

            // broken?
            //var f = _floats[0];
            var f = ((float[])(object)_floats)[0];

            return(f);
        }
Ejemplo n.º 2
0
        public virtual float ReadSingle()
        {
            var r = (BinaryReader)(object)this;
            var bytes = r.ReadBytes(4);

            var _bytes = new assets::ScriptCoreLib.JavaScript.WebGL.Uint8Array(bytes);
            var _floats = new assets::ScriptCoreLib.JavaScript.WebGL.Float32Array(_bytes.buffer, 0, 1);

            // broken?
            //var f = _floats[0];
            var f = ((float[])(object)_floats)[0];

            return f;
        }