示例#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);
        }
示例#2
0
        /// <summary>
        /// Packs a <see cref="Vector4"/> into a <see cref="ulong"/>.
        /// </summary>
        /// <param name="vector">The vector containing the values to pack.</param>
        /// <returns>The <see cref="ulong"/> containing the packed values.</returns>
        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);
        }
示例#3
0
 public void PackFromVector4(Vector4 vector)
 {
     this.PackedValue = HalfTypeHelper.Pack(vector.X);
 }
示例#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);
 }