You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error while tryring to use magnitude() on a nalgebra::Vector3<decorum::R64>:
no method named `magnitude` found for type `na::Matrix<decorum::ConstrainedFloat<f64, decorum::constraint::FiniteConstraint<f64>>, na::U3, na::U1, na::ArrayStorage<decorum::ConstrainedFloat<f64, decorum::constraint::FiniteConstraint<f64>>, na::U3, na::U1>>` in the current scope
note: the method `magnitude` exists but the following trait bounds were not satisfied:
`decorum::ConstrainedFloat<f64, decorum::constraint::FiniteConstraint<f64>> : na::Real`rustc(E0599)
The same problem comes up with normalize() but I can bypass using plexus::geomertry::ops::Normalize trait. Is this how it's supposed to be? Should I bypass the magnitude issue by implementing my own trait?
(I'm new to Rust, sorry if I'm missing something obvious here)
The text was updated successfully, but these errors were encountered:
Decorum's types do not implement alga's RealField trait, which is required for the magnitude and normalize APIs in nalgebra. This problem is being discussed in #16 and an issue was opened against alga as well.
I'm hoping that the requirements for RealField and ComplexField may be relaxed. Depending on that discussion, I may implement RealField behind a Cargo feature.
If you're using Plexus, I recommend using a recent commit from master, as the last release on crates.io is quite stale. Plexus now abstracts Euclidean spaces using the Theon crate, which provides APIs that include Euclidean norms and should support R64.
I get the following error while tryring to use
magnitude()
on analgebra::Vector3<decorum::R64>
:The same problem comes up with
normalize()
but I can bypass usingplexus::geomertry::ops::Normalize
trait. Is this how it's supposed to be? Should I bypass the magnitude issue by implementing my own trait?(I'm new to Rust, sorry if I'm missing something obvious here)
The text was updated successfully, but these errors were encountered: