예제 #1
0
        private static string floatArrayToString(float[] array, int num)
        {
            StringBuilder stringBuilder = new StringBuilder().append(array.Length);
            int           num2          = array.Length;

            for (int i = 0; i < num2; i++)
            {
                float num3 = array[i];
                if (num == 3)
                {
                    stringBuilder.append(' ').append(DataUtil.formatDouble((double)num3, 10, 5));
                }
                else if (num == 1)
                {
                    FloatConverter floatConverter = new FloatConverter();
                    int            num4           = FloatConverter.ToInt(num3, ref floatConverter);
                    stringBuilder.append(" 0x").append(Integer.toHexString(num4));
                }
                else if (num == 2)
                {
                    stringBuilder.append(' ').append(Utilities.doubleToScientificString((double)num3, 8));
                }
            }
            return(stringBuilder.toString());
        }
예제 #2
0
    public static int FloatToRawIntBits(float f)
    {
        FloatConverter converter = new FloatConverter();

        return(FloatConverter.ToInt(f, ref converter));
    }
예제 #3
0
        public static float swapFloat(float floatValue)
        {
            FloatConverter floatConverter = new FloatConverter();

            return(FloatConverter.ToFloat(Utilities.swapInteger(FloatConverter.ToInt(floatValue, ref floatConverter)), ref floatConverter));
        }
예제 #4
0
    public virtual void write(float f)
    {
        FloatConverter floatConverter;

        this.write(FloatConverter.ToInt(f, ref floatConverter));
    }