Defined in File quaternion.h
int rc_quaternion_conjugate(rc_vector_t q, rc_vector_t *c)¶
Calculates conjugate of quaternion q.
Populates quaternion vector c with the conjugate of quaternion q where the 3 imaginary parts ijk are multiplied by -1. 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.
q – [in] The quarter
c – [out] output conjugate
Returns 0 on success or -1 on failure.