|
| 1 | +<p align="center"> |
| 2 | + <img src="http://nalgebra.org/img/logo_nalgebra.svg" alt="crates.io"> |
| 3 | +</p> |
1 | 4 | <p align="center"> |
2 | 5 | <a href="https://crates.io/crates/nalgebra"> |
3 | 6 | <img src="http://meritbadge.herokuapp.com/nalgebra?style=flat-square" alt="crates.io"> |
|
8 | 11 | </p> |
9 | 12 | <p align = "center"> |
10 | 13 | <strong> |
11 | | - <a href="http://nalgebra.org/doc/nalgebra">Documentation</a> | <a href="http://users.nphysics.org">Forum</a> |
| 14 | + <a href="http://nalgebra.org">Users guide</a> | <a href="http://nalgebra.org/rustdoc/nalgebra/index.html">Documentation</a> | <a href="http://users.nphysics.org">Forum</a> |
12 | 15 | </strong> |
13 | 16 | </p> |
14 | | - |
15 | | -nalgebra |
16 | | -======== |
17 | | - |
18 | | -**nalgebra** is a low-dimensional linear algebra library written for Rust targeting: |
19 | | - |
20 | | -* General-purpose linear algebra (still lacks a lot of features…) |
21 | | -* Real time computer graphics. |
22 | | -* Real time computer physics. |
23 | | - |
24 | | -## Using **nalgebra** |
25 | | -You will need the last stable build of the [rust compiler](http://www.rust-lang.org) |
26 | | -and the official package manager: [cargo](https://github.com/rust-lang/cargo). |
27 | | - |
28 | | -Simply add the following to your `Cargo.toml` file: |
29 | | - |
30 | | -```.ignore |
31 | | -[dependencies] |
32 | | -nalgebra = "0.10.*" |
33 | | -``` |
34 | | - |
35 | | - |
36 | | -All the functionality of **nalgebra** is grouped in one place: the root module `nalgebra::`. This |
37 | | -module re-exports everything and includes free functions for all traits methods performing |
38 | | -out-of-place operations. |
39 | | - |
40 | | -Thus, you can import the whole prelude using: |
41 | | - |
42 | | -```.ignore |
43 | | -use nalgebra::*; |
44 | | -``` |
45 | | - |
46 | | -However, the recommended way to use **nalgebra** is to import types and traits |
47 | | -explicitly, and call free-functions using the `na::` prefix: |
48 | | - |
49 | | -```.rust |
50 | | -extern crate nalgebra as na; |
51 | | -use na::{Vector3, Rotation3, Rotation}; |
52 | | -
|
53 | | -fn main() { |
54 | | - let a = Vector3::new(1.0f64, 1.0, 1.0); |
55 | | - let mut b = Rotation3::new(na::zero()); |
56 | | -
|
57 | | - b.append_rotation_mut(&a); |
58 | | -
|
59 | | - assert!(na::approx_eq(&na::rotation(&b), &a)); |
60 | | -} |
61 | | -``` |
62 | | - |
63 | | - |
64 | | -## Features |
65 | | -**nalgebra** is meant to be a general-purpose, low-dimensional, linear algebra library, with |
66 | | -an optimized set of tools for computer graphics and physics. Those features include: |
67 | | - |
68 | | -* Vectors with predefined static sizes: `Vector1`, `Vector2`, `Vector3`, `Vector4`, `Vector5`, `Vector6`. |
69 | | -* Vector with a user-defined static size: `VectorN` (available only with the `generic_sizes` feature). |
70 | | -* Points with static sizes: `Point1`, `Point2`, `Point3`, `Point4`, `Point5`, `Point6`. |
71 | | -* Square matrices with static sizes: `Matrix1`, `Matrix2`, `Matrix3`, `Matrix4`, `Matrix5`, `Matrix6 `. |
72 | | -* Rotation matrices: `Rotation2`, `Rotation3` |
73 | | -* Quaternions: `Quaternion`, `Unit<Quaternion>`. |
74 | | -* Unit-sized values (unit vectors, unit quaternions, etc.): `Unit<T>`, e.g., `Unit<Vector3<f32>>`. |
75 | | -* Isometries (translation ⨯ rotation): `Isometry2`, `Isometry3` |
76 | | -* Similarity transformations (translation ⨯ rotation ⨯ uniform scale): `Similarity2`, `Similarity3`. |
77 | | -* 3D projections for computer graphics: `Persp3`, `PerspMatrix3`, `Ortho3`, `OrthoMatrix3`. |
78 | | -* Dynamically sized heap-allocated vector: `DVector`. |
79 | | -* Dynamically sized stack-allocated vectors with a maximum size: `DVector1` to `DVector6`. |
80 | | -* Dynamically sized heap-allocated (square or rectangular) matrix: `DMatrix`. |
81 | | -* Linear algebra and data analysis operators: `Covariance`, `Mean`, `qr`, `cholesky`. |
82 | | -* Almost one trait per functionality: useful for generic programming. |
0 commit comments