From 9d5d3f49f9e1acdb620fb55980c7c4c4e641df5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Wed, 26 Nov 2014 14:36:50 +0100 Subject: [PATCH] Do not mantion the double-dispatch on the doc. --- README.md | 18 +----------------- src/lib.rs | 19 +------------------ 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 79fd4281..003897f3 100644 --- a/README.md +++ b/README.md @@ -51,20 +51,4 @@ an optimized set of tools for computer graphics and physics. Those features incl * Dynamically sized (square or rectangular) matrix: `DMat`. * A few methods for data analysis: `Cov`, `Mean`. * Almost one trait per functionality: useful for generic programming. -* Operator overloading using the double trait dispatch - [trick](http://smallcultfollowing.com/babysteps/blog/2012/10/04/refining-traits-slash-impls/). - For example, the following works: - -```rust -extern crate "nalgebra" as na; -use na::{Vec3, Mat3}; - -fn main() { - let v: Vec3 = na::zero(); - let m: Mat3 = na::one(); - - let _ = m * v; // matrix-vector multiplication. - let _ = v * m; // vector-matrix multiplication. - let _ = m * m; // matrix-matrix multiplication. - let _ = v * 2.0f64; // vector-scalar multiplication. -} +* Operator overloading using multidispatch. diff --git a/src/lib.rs b/src/lib.rs index ac7751b1..6bc79e74 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -52,24 +52,7 @@ an optimized set of tools for computer graphics and physics. Those features incl * Dynamically sized (square or rectangular) matrix: `DMat`. * A few methods for data analysis: `Cov`, `Mean`. * Almost one trait per functionality: useful for generic programming. -* Operator overloading using the double trait dispatch - [trick](http://smallcultfollowing.com/babysteps/blog/2012/10/04/refining-traits-slash-impls/). - For example, the following works: - -```rust -extern crate "nalgebra" as na; -use na::{Vec3, Mat3}; - -fn main() { - let v: Vec3 = na::zero(); - let m: Mat3 = na::one(); - - let _ = m * v; // matrix-vector multiplication. - let _ = v * m; // vector-matrix multiplication. - let _ = m * m; // matrix-matrix multiplication. - let _ = v * 2.0f64; // vector-scalar multiplication. -} -``` +* Operator overloading using multidispatch. ## Compilation You will need the last nightly build of the [rust compiler](http://www.rust-lang.org)