diff --git a/README.md b/README.md index bd506833..7fed2991 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# nalgebra [![Build Status](https://travis-ci.org/sebcrozet/nalgebra.png?branch=master)](https://travis-ci.org/sebcrozet/nalgebra) +# nalgebra + +[![Build Status](https://travis-ci.org/sebcrozet/nalgebra.png?branch=master)](https://travis-ci.org/sebcrozet/nalgebra) + **nalgebra** is a linear algebra library written for Rust targeting: * general-purpose linear algebra (still misses a lot of features…). @@ -12,24 +15,13 @@ All the functionalities of **nalgebra** are grouped in one place: the `na` modul This module re-exports everything and includes free functions for all traits methods doing out-of-place modifications. -* You can import the whole prelude, including free functions, using: +* You can import the whole prelude using: ```.rust use nalgebra::na::*; ``` -* If you dont want to import everything but only every trait: - -```.rust -use nalgebra::traits::*; -``` - -* If you dont want to import everything but only every structure: - -```.rust -use nalgebra::structs::*; -``` -The preffered way to use **nalgebra** is to import types and traits explicitly, and call +The preferred way to use **nalgebra** is to import types and traits explicitly, and call free-functions using the `na::` prefix: ```.rust @@ -43,7 +35,7 @@ fn main() { b.append_rotation(&a); - assert!(na::rotation(&b).approx_eq(&a)); + assert!(na::approx_eq(&na::rotation(&b), &a)); } ``` diff --git a/src/lib.rs b/src/lib.rs index ea2dc9be..730a6c82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,24 +16,13 @@ All the functionalities of **nalgebra** are grouped in one place: the `na` modul This module re-exports everything and includes free functions for all traits methods doing out-of-place modifications. -* You can import the whole prelude, including free functions, using: +* You can import the whole prelude using: ```.rust use nalgebra::na::*; ``` -* If you dont want to import everything but only every trait: - -```.rust -use nalgebra::traits::*; -``` - -* If you dont want to import everything but only every structure: - -```.rust -use nalgebra::structs::*; -``` -The preffered way to use **nalgebra** is to import types and traits explicitly, and call +The preferred way to use **nalgebra** is to import types and traits explicitly, and call free-functions using the `na::` prefix: ```.rust @@ -47,7 +36,7 @@ fn main() { b.append_rotation(&a); - assert!(na::rotation(&b).approx_eq(&a)); + assert!(na::approx_eq(&na::rotation(&b), &a)); } ```