Merge pull request #306 from bjz/add-prelude
Add prelude module for easy importing of common traits
This commit is contained in:
commit
bf4637352e
3 changed files with 26 additions and 0 deletions
|
@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
### Added
|
||||
|
||||
- Implements `fmt::Debug` for `Basis2`, `Basis3`, and `AffineMatrix3`
|
||||
- A `prelude` module for easy importing of common traits.
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ pub use rust_num::{One, Zero, one, zero};
|
|||
|
||||
// Modules
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
mod macros;
|
||||
|
||||
mod array;
|
||||
|
|
23
src/prelude.rs
Normal file
23
src/prelude.rs
Normal file
|
@ -0,0 +1,23 @@
|
|||
//! This module contains the most common traits used in `cgmath`. By
|
||||
//! glob-importing this module, you can avoid the need to import each trait
|
||||
//! individually, while still being selective about what types you import.
|
||||
|
||||
pub use angle::Angle;
|
||||
|
||||
pub use array::Array;
|
||||
|
||||
pub use matrix::Matrix;
|
||||
pub use matrix::SquareMatrix;
|
||||
|
||||
pub use point::Point;
|
||||
|
||||
pub use rotation::Rotation;
|
||||
pub use rotation::Rotation2;
|
||||
pub use rotation::Rotation3;
|
||||
|
||||
pub use transform::Transform;
|
||||
pub use transform::Transform2;
|
||||
pub use transform::Transform3;
|
||||
|
||||
pub use vector::EuclideanVector;
|
||||
pub use vector::Vector;
|
Loading…
Reference in a new issue