Rotation3 angle from 2 vectors
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I use this snippet to rotate my vector:
```rs
use nalgebra::{Point3, Rotation3, Vector3};
use std::f32;
let axisangle = Vector3::y() * f32::consts::FRAC_PI_2;
// Point and vector being transformed in the tests.
let pt = Point3::new(4.0, 5.0, 6.0);
let vec = Vector3::new(4.0, 5.0, 6.0);
let rot = Rotation3::new(axisangle);
// assert_relative_eq!(
// rot * pt,
// Point3::new(6.0, 5.0, -4.0),
// epsilon = 1.0e-6
// );
// assert_relative_eq!(
// rot * vec,
// Vector3::new(6.0, 5.0, -4.0),
// epsilon = 1.0e-6
// );
```
The problem is that I want to get f32::consts::FRAC_PI_2 rotation angle back from result (ie `Vector3::new(6.0, 5.0, -4.0)`) and origin (ie `Vector3::new(4.0, 5.0, 6.0)`).
I can't find any function like `Rotation3::get_angle(axis_angle,V1,V2)`.
Does this function exists or is it planned for implementation ?
Thank you in advance for your answer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.