Skip to content

Quaternion inverse is not the same as conjugate #95

Description

@mbierlee

In

gl3n/gl3n/linalg.d

Lines 2097 to 2108 in a010cea

void invert() {
x = -x;
y = -y;
z = -z;
}
alias invert conjugate; /// ditto
/// Returns an inverted copy of the current quaternion.
@property Quaternion inverse() const {
return Quaternion(w, -x, -y, -z);
}
alias inverse conjugated; /// ditto

It is stated that the inverse of a quaternion is the same as its conjugate. This is not correct. The conjugate is what it is doing now, the inverse should be conjugate / magnitude_squared.

See also:
https://www.3dgep.com/understanding-quaternions/#quaternion-conjugate
https://www.3dgep.com/understanding-quaternions/#quaternion-inverse

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions