Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

vector-multiplication.md 585B

Vector multiplication

To multiply vectors, use the *:

// Unity Mathematics example
void ComponentwiseVectorMultiplyUnityMathematics()
{
   var v0 = new float4(2.0f, 4.0f, 6.0f, 8.0f);
   var v1 = new float4(1.0f, -1.0f, 1.0f, -1.0f);
   var result = v0 * v1;
   // result == new float4(2.0f, -4.0f, 6.0f, -8.0f).
}

This is a common way of writing SIMD code, which applies a single instruction to multiple data elements. Other operators such as addition, subtraction, and division work in the same way.