cgmath icon indicating copy to clipboard operation
cgmath copied to clipboard

No Basis3 or Matrix3 identity?

Open thorlucas opened this issue 5 years ago • 3 comments

Why is there no way to just do Basis3::<f32>::identity()?

thorlucas avatar Oct 14 '20 06:10 thorlucas

You can do Basis3::one() or Basis3::from_quaternion(Quaternion::one())

kvark avatar Oct 15 '20 13:10 kvark

Thanks! I find that to be a bit of an unintuitive way to name it, no?

thorlucas avatar Oct 15 '20 18:10 thorlucas

Yes, well, it's just that cgmath has a One trait that it tries to use everywhere.. It could have an alias method named identity in the basis3

kvark avatar Oct 15 '20 18:10 kvark