Function rc_quaternion_multiply#

Function Documentation#

int rc_quaternion_multiply(rc_vector_t a, rc_vector_t b, rc_vector_t *c)#

Calculates the quaternion Hamilton product ab=c.

Places the result in vector argument c. If c is already of length 4 then the old values are overwritten. Otherwise the old memory in c is freed and new memory is allocated to help prevent memory leaks.

Parameters:
  • a[in] First input

  • b[in] second input

  • c[out] output

Returns:

Returns 0 on success or -1 on failure.