quaternionConjugate function

Array quaternionConjugate(
  1. Array quat
)

Implementation

Array quaternionConjugate(Array quat) {
  assert(listEqual(quat.shape.toList(), [4, 1]));

  return quat *
      Array(values: [
        [-1],
        [-1],
        [-1],
        [1],
      ]);
}