Freigeben über


_Dot3dVW0 (Windows CE 5.0)

Send Feedback

Computes the inner product of a pair of three or four-dimensional vectors with the "w" coordinate forced to 0.

float _Dot3dVW0(   float* vector1,   float* vector2);

Parameters

  • vector1
    [in] Pointer to a three or four-dimensional source vector.
  • vector2
    [in] Pointer to a three or four-dimensional destination vector.

Return Values

The scalar resulting from the inner product.

Remarks

The fourth coordinate of a source vector will always force to 0.

To implement this function, use the -Qsh4 -Oi flag when compiling.

The following code example shows how to use Dot3dVW0 to compute the inner products of three or four dimensional vectors.

/***********************************************************/
#include <stdio.h>
#include <shintr.h>
void main()
{
     float result;
     float v1[4]={1.0,2.0,3.0,4.0};
     float v2[4]={2.0,3.0,4.0,5.0};
     result = _Dot3dVW0(v1,v2);
/***********************************************************/
     printf("result=%f\n", result);
}

This example results in the following output.

retval=20.000000

Requirements

Header: shintr.h.

See Also

_Dot4dV | _Dot3dVW1 | Intrinsic Functions for Renesas Microprocessors

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.