Example #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);
        }
Example #2
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);
        }
Example #3
0
 public void PackFromVector4(Vector4 vector)
 {
     this.PackedValue = HalfTypeHelper.Pack(vector.X);
 }
Example #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);
 }