rustgd / cgmath

A linear algebra and mathematics library for computer graphics.
https://docs.rs/cgmath
Apache License 2.0
1.12k stars 155 forks source link

Implement IntoMint trait for Vectors, Points, Matrices, and Quaternions #539

Closed CyborgSquirrel closed 2 years ago

CyborgSquirrel commented 2 years ago

Mint 0.5.8 added a new trait called IntoMint, which lets you specify the mint type that another type is associated with. That way you can convert a type into its mint representation without having to specify the mint type.

I implemented IntoMint for Vectors, Points, Matrices, and Quaternions.

I didn't implement IntoMint for Euler angles, because I couldn't figure out which mint type they should correspond to.