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
error[E0034]: multiple applicable items in scope
--> hello_gl\src\main.rs:29:16
|
29 | let tran = Matrix4::one();
| ^^^^^^^^^^^^ multiple one found
|
= note: candidate #1 is defined in an impl of the trait cgmath::One for the type cgmath::Matrix4<_>
= note: candidate #2 is defined in an impl of the trait cgmath::Transform for the type cgmath::Matrix4<_>
code:
use cgmath::prelude::*;
use cgmath::{Vector4, Matrix4};
let vec = m::vec3::<f32>(1.0, 0.0, 0.0);
let tran = Matrix4::<f32>::one();
let vec = tran.transform_vector(vec);
println!("{:?}", &vec);
The text was updated successfully, but these errors were encountered:
Given that there is One trait, we should rename Transform::one to something more unique. identity() is already provided for SquareMatrix trait, which would conflict with Transform for matrices... Maybe Transform should just derive from One and re-use it's one() method instead of adding one for itself? There appears to be quite an overlap between traits (speaking of #419 ...).
error[E0034]: multiple applicable items in scope
--> hello_gl\src\main.rs:29:16
|
29 | let tran = Matrix4::one();
| ^^^^^^^^^^^^ multiple
one
found|
= note: candidate #1 is defined in an impl of the trait
cgmath::One
for the typecgmath::Matrix4<_>
= note: candidate #2 is defined in an impl of the trait
cgmath::Transform
for the typecgmath::Matrix4<_>
code:
The text was updated successfully, but these errors were encountered: