Example #1
0
        public static void SetFloat(this IArrayBuffer <byte> buffer, int start, float value, bool isLittleEndian)
        {
            Contract.Requires(buffer != null);

            buffer.CheckIndex(start, sizeof(float));
            buffer.SetInt32(start,
                            ByteBufferUtil.SingleToInt32Bits(value),
                            BitConverter.IsLittleEndian == isLittleEndian);
        }
Example #2
0
 public IByteBuffer SetFloatLE(int index, float value) => this.SetIntLE(index, ByteBufferUtil.SingleToInt32Bits(value));
Example #3
0
 public IByteBuffer WriteFloatLE(float value) => this.WriteIntLE(ByteBufferUtil.SingleToInt32Bits(value));
Example #4
0
 public virtual IByteBuffer SetFloat(int index, float value)
 {
     this.SetInt(index, ByteBufferUtil.SingleToInt32Bits(value));
     return(this);
 }
Example #5
0
 public virtual IByteBuffer WriteFloat(float value)
 {
     this.WriteInt(ByteBufferUtil.SingleToInt32Bits(value));
     return(this);
 }