public static void WriteIntU(long aVal, byte[] aBuf, int aOff) { if (aVal > LittleEndianHelper.UINT_MAX) { throw new IOException(ExcelRenderRes.MaxValueExceeded(LittleEndianHelper.UINT_MAX.ToString(CultureInfo.InvariantCulture))); } LittleEndianHelper.WriteInt((int)(aVal & -1), aBuf, aOff); }
public static void WriteFixed32(double aVal, byte[] aBuff, int aOff) { bool flag = false; if (aVal < 0.0) { aVal *= -1.0; flag = true; } double num = Math.Floor(aVal); double num2 = aVal - num; num2 *= 65536.0; int num3 = (int)num << 16; num3 += (int)num2; if (flag) { num3 *= -1; } LittleEndianHelper.WriteInt(num3, aBuff, aOff); }
private void SetValue32(int offset, int mask, int value) { int aVal = BitField32.PutValue(LittleEndianHelper.ReadInt(this.m_xfData, offset), mask, value); LittleEndianHelper.WriteInt(aVal, this.m_xfData, offset); }
public static void WriteFloat(float aVal, byte[] aBuf, int aOff) { LittleEndianHelper.WriteInt(Convert.ToInt32(aVal), aBuf, aOff); }