Beispiel #1
0
        private static uint Pack(float x, float y)
        {
            uint num2 = HalfTypeHelper.Pack(x);
            uint num  = (uint)(HalfTypeHelper.Pack(y) << 0x10);

            return(num2 | num);
        }
Beispiel #2
0
        public void PackFromScaledVector4(Vector4 vector)
        {
            float scaled = vector.X;

            scaled          *= 2F;
            scaled          -= 1F;
            this.PackedValue = HalfTypeHelper.Pack(scaled);
        }
Beispiel #3
0
        private static ulong Pack(ref Vector4 vector)
        {
            ulong num4 = HalfTypeHelper.Pack(vector.X);
            ulong num3 = (ulong)HalfTypeHelper.Pack(vector.Y) << 0x10;
            ulong num2 = (ulong)HalfTypeHelper.Pack(vector.Z) << 0x20;
            ulong num1 = (ulong)HalfTypeHelper.Pack(vector.W) << 0x30;

            return(num4 | num3 | num2 | num1);
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HalfSingle"/> struct.
 /// </summary>
 /// <param name="single">The single component.</param>
 public HalfSingle(float single)
 {
     this.PackedValue = HalfTypeHelper.Pack(single);
 }
Beispiel #5
0
 public void PackFromVector4(Vector4 vector)
 {
     this.PackedValue = HalfTypeHelper.Pack(vector.X);
 }