vec_xmul

Purpose

Returns a vector containing the result of cross multiplying the first and the third elements of a by the elements of b.

Syntax

d=vec_xmul(a, b)

Result and argument types

The following table describes the types of the returned value and the function arguments.

d a b
vector4double vector4double vector4double

Result value

The values of the elements of the result are obtained by cross multiplying the first and the third elements of a by the elements of b.

Formula

d[0] = a[0] × b[0]
d[1] = a[0] × b[1]
d[2] = a[2] × b[2]
d[3] = a[2] × b[3]

Example

a =   (10.0,   0.0,   30.0,    0.0)
b =   (50.0,  60.0,   70.0,   80.0)
d: (500.0, 600.0, 2100.0, 2400.0)