/** * float型(4バイト書き込み) * @param n * @throws IOException */ public void WriteFloat(float f) { Bit32Change ch = new Bit32Change(); int n = ch.FloatToRawIntBits(f); this.WriteInt(n); }
/// <summary> /// float型(4バイト読み込み) /// </summary> /// <returns>float型の値を返す</returns> public unsafe float ReadFloat() { if (m_isBigEndian) { float tmp; ReadByte(&tmp, 4); return(tmp); } Bit32Change ch = new Bit32Change(); return(ch.IntBitsToFloat(ReadInt())); }
/// <summary> /// float型(4バイト書き込み) /// </summary> /// <param name="f">float型の少数値</param> public unsafe void WriteFloat(float f) { if (m_isBigEndian) { WriteByte(&f, 4); return; } Bit32Change ch = new Bit32Change(); int n = ch.FloatToRawIntBits(f); this.WriteInt(n); }
/** * float型(4バイト読み込み) * @return floatの値を返す * @throws IOException */ public float ReadFloat() { Bit32Change ch = new Bit32Change(); return(ch.IntBitsToFloat(ReadInt())); }