dimforge / dimforge/nalgebra

Improve handling of UnitQuaternions

Open
#980 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I encountered [a bug in Rapier](https://github.com/dimforge/rapier/issues/233) that was caused by incorrectly creating UnitQuaternions with zero values.

As per @sebcrozet's suggestion, to help avoid this in the future the following can be done:

- [x] Update documentation for `new_normalize` to say that the input vector must be non-zero
- [ ] Add a `debug-assert` to in `new_normalize` to verify this.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.