Ejemplo n.º 1
0
 public static Vector4D Multiply_Software(VectorDParam1_3 left, float scalar)
 {
     return(Vector256.Create(
                X(left) * scalar,
                Y(left) * scalar,
                Z(left) * scalar,
                W(left) * scalar
                ));
 }
Ejemplo n.º 2
0
 public static Vector4D Subtract_Software(VectorDParam1_3 vector, float scalar)
 {
     return(Vector256.Create(
                X(vector) - scalar,
                Y(vector) - scalar,
                Z(vector) - scalar,
                W(vector) - scalar
                ));
 }
Ejemplo n.º 3
0
 public static Vector4D Multiply_Software(VectorDParam1_3 left, VectorDParam1_3 right)
 {
     return(Vector256.Create(
                X(left) * X(right),
                Y(left) * Y(right),
                Z(left) * Z(right),
                W(left) * W(right)
                ));
 }
Ejemplo n.º 4
0
 public static Vector4D Add_Software(VectorDParam1_3 left, VectorDParam1_3 right)
 {
     return(Vector256.Create(
                X(left) + X(right),
                Y(left) + Y(right),
                Z(left) + Z(right),
                W(left) + W(right)
                ));
 }
Ejemplo n.º 5
0
 public static Vector4D Subtract_Software(VectorDParam1_3 left, VectorDParam1_3 right)
 {
     return(Vector256.Create(
                X(left) - X(right),
                Y(left) - Y(right),
                Z(left) - Z(right),
                W(left) - W(right)
                ));
 }
Ejemplo n.º 6
0
 public static Vector4D Abs_Software(VectorDParam1_3 vector)
 {
     return(Vector256.Create(
                Math.Abs(X(vector)),
                Math.Abs(Y(vector)),
                Math.Abs(Z(vector)),
                Math.Abs(W(vector))
                ));
 }
Ejemplo n.º 7
0
 public static Vector4D Sqrt_Software(VectorDParam1_3 vector)
 {
     return(Vector256.Create(
                Math.Sqrt(X(vector)),
                Math.Sqrt(Y(vector)),
                Math.Sqrt(Z(vector)),
                Math.Sqrt(W(vector))
                ));
 }
Ejemplo n.º 8
0
 public static Vector4D Clamp_Software(VectorDParam1_3 vector, VectorDParam1_3 low, VectorDParam1_3 high)
 {
     return(Vector256.Create(
                Math.Clamp(X(vector), X(low), X(high)),
                Math.Clamp(Y(vector), Y(low), Y(high)),
                Math.Clamp(Z(vector), Z(low), Z(high)),
                Math.Clamp(W(vector), W(low), W(high))
                ));
 }
Ejemplo n.º 9
0
 public static Vector4D Divide_Software(VectorDParam1_3 dividend, float scalarDivisor)
 {
     return(Vector256.Create(
                X(dividend) / scalarDivisor,
                Y(dividend) / scalarDivisor,
                Z(dividend) / scalarDivisor,
                W(dividend) / scalarDivisor
                ));
 }
Ejemplo n.º 10
0
 public static Vector4D Divide_Software(VectorDParam1_3 dividend, VectorDParam1_3 divisor)
 {
     return(Vector256.Create(
                X(dividend) / X(divisor),
                Y(dividend) / Y(divisor),
                Z(dividend) / Z(divisor),
                W(dividend) / W(divisor)
                ));
 }
        public static Vector4D Not_Software(VectorDParam1_3 vector)
        {
                double x = Helpers.X(vector);
                double y = Helpers.Y(vector);
                double z = Helpers.Z(vector);
                double w = Helpers.W(vector);

                uint notX = ~Unsafe.As<double, uint>(ref x);
                uint notY = ~Unsafe.As<double, uint>(ref y);
                uint notZ = ~Unsafe.As<double, uint>(ref z);
                uint notW = ~Unsafe.As<double, uint>(ref w);

                return Vector256.Create(
                    Unsafe.As<uint, double>(ref notX),
                    Unsafe.As<uint, double>(ref notY),
                    Unsafe.As<uint, double>(ref notZ),
                    Unsafe.As<uint, double>(ref notW)
                );
        }
        public static Vector4D Xor_Software(VectorDParam1_3 left, VectorDParam1_3 right)
        {
                double x1 = Helpers.X(left);
                double y1 = Helpers.Y(left);
                double z1 = Helpers.Z(left);
                double w1 = Helpers.W(left);

                double x2 = Helpers.X(right);
                double y2 = Helpers.Y(right);
                double z2 = Helpers.Z(right);
                double w2 = Helpers.W(right);

                uint xorX = Unsafe.As<double, uint>(ref x1) ^ Unsafe.As<double, uint>(ref x2);
                uint xorY = Unsafe.As<double, uint>(ref y1) ^ Unsafe.As<double, uint>(ref y2);
                uint xorZ = Unsafe.As<double, uint>(ref z1) ^ Unsafe.As<double, uint>(ref z2);
                uint xorW = Unsafe.As<double, uint>(ref w1) ^ Unsafe.As<double, uint>(ref w2);

                return Vector256.Create(
                    Unsafe.As<uint, double>(ref xorX),
                    Unsafe.As<uint, double>(ref xorY),
                    Unsafe.As<uint, double>(ref xorZ),
                    Unsafe.As<uint, double>(ref xorW)
                );
        }
        public static Vector4D And_Software(VectorDParam1_3 left, VectorDParam1_3 right)
        {
                double x1 = Helpers.X(left);
                double y1 = Helpers.Y(left);
                double z1 = Helpers.Z(left);
                double w1 = Helpers.W(left);

                double x2 = Helpers.X(right);
                double y2 = Helpers.Y(right);
                double z2 = Helpers.Z(right);
                double w2 = Helpers.W(right);

                uint andX = Unsafe.As<double, uint>(ref x1) & Unsafe.As<double, uint>(ref x2);
                uint andY = Unsafe.As<double, uint>(ref y1) & Unsafe.As<double, uint>(ref y2);
                uint andZ = Unsafe.As<double, uint>(ref z1) & Unsafe.As<double, uint>(ref z2);
                uint andW = Unsafe.As<double, uint>(ref w1) & Unsafe.As<double, uint>(ref w2);

                return Vector256.Create(
                    Unsafe.As<uint, double>(ref andX),
                    Unsafe.As<uint, double>(ref andY),
                    Unsafe.As<uint, double>(ref andZ),
                    Unsafe.As<uint, double>(ref andW)
                );
        }
 public static Vector4D AndNot_Software(VectorDParam1_3 left, VectorDParam1_3 right)
 {
         return And_Software(Not_Software(left), right);
 }