quat_equal: Quaternion equality

quat_equalR Documentation

Quaternion equality

Description

Like most mathematical objects, there is a notion of equality on quaternions. Because the focus here is on using quaternions to rotate, quaternions are considered equal if they produce the same rotation.

Usage

## S3 method for class 'dddr_quat'
vec_proxy_equal(x, ...)

## S3 method for class 'dddr_quat'
all.equal(target, current, ...)

compare_proxy.dddr_quat(x, path)

Arguments

x

Quaternions to form a proxy for.

...

arguments passed on the underlying function for all.equal

target, current

quaternions to compare

path

Path describing the proxy operation

Details

In particular, if all entries in a quaternion are negated, the result is the same exact rotation. This is known as "double cover." In this case, the quaternions (w,x,y,z) and (-w,-x,-y,-z) are considered equal.

The assorted proxy methods create a data frame that shows where the unit x and unit y vectors are mapped in 3d space. This is more numerically stable than normalizing based on e.g. sign of w.


MrMallIronmaker/dddr documentation built on May 11, 2022, 8:39 p.m.