Update to the last rust-nighly.

Version of rustc: rustc 1.0.0-nightly (123a754cb 2015-03-24).
This commit is contained in:
Sébastien Crozet 2015-03-25 22:36:19 +01:00
parent 77217a61d6
commit 0988b837dc
13 changed files with 26 additions and 23 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "nalgebra"
version = "0.2.6"
version = "0.2.7"
authors = [ "Sébastien Crozet <developer@crozet.re>" ] # FIXME: add the contributors.
description = "Linear algebra library for computer physics, computer graphics and general low-dimensional linear algebra for Rust."

View File

@ -85,9 +85,10 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
#![feature(unboxed_closures)]
#![feature(core)]
#![feature(std_misc)]
#![feature(test)]
#![doc(html_root_url = "http://nalgebra.org/doc")]
extern crate "rustc-serialize" as rustc_serialize;
extern crate rustc_serialize;
extern crate rand;
#[cfg(feature="arbitrary")]

View File

@ -264,7 +264,7 @@ impl<N> Shape<(usize, usize)> for DMat<N> {
impl<N> Index<(usize, usize)> for DMat<N> {
type Output = N;
fn index(&self, &(i, j): &(usize, usize)) -> &N {
fn index(&self, (i, j): (usize, usize)) -> &N {
assert!(i < self.nrows);
assert!(j < self.ncols);
@ -275,7 +275,7 @@ impl<N> Index<(usize, usize)> for DMat<N> {
}
impl<N> IndexMut<(usize, usize)> for DMat<N> {
fn index_mut(&mut self, &(i, j): &(usize, usize)) -> &mut N {
fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut N {
assert!(i < self.nrows);
assert!(j < self.ncols);

View File

@ -67,7 +67,7 @@ macro_rules! dvec_impl(
#[inline]
unsafe fn unsafe_at(&self, i: usize) -> N {
*self.at.as_slice().get_unchecked(i)
*self.at[..].get_unchecked(i)
}
#[inline]
@ -80,14 +80,14 @@ macro_rules! dvec_impl(
impl<N> Index<usize> for $dvec<N> {
type Output = N;
fn index(&self, i: &usize) -> &N {
&self.as_slice()[*i]
fn index(&self, i: usize) -> &N {
&self.as_slice()[i]
}
}
impl<N> IndexMut<usize> for $dvec<N> {
fn index_mut(&mut self, i: &usize) -> &mut N {
&mut self.as_mut_slice()[*i]
fn index_mut(&mut self, i: usize) -> &mut N {
&mut self.as_mut_slice()[i]
}
}

View File

@ -304,7 +304,7 @@ macro_rules! index_impl(
impl<N> Index<(usize, usize)> for $t<N> {
type Output = N;
fn index(&self, &(i, j): &(usize, usize)) -> &N {
fn index(&self, (i, j): (usize, usize)) -> &N {
unsafe {
&mem::transmute::<&$t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
}
@ -312,7 +312,7 @@ macro_rules! index_impl(
}
impl<N> IndexMut<(usize, usize)> for $t<N> {
fn index_mut(&mut self, &(i, j): &(usize, usize)) -> &mut N {
fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut N {
unsafe {
&mut mem::transmute::<&mut $t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
}

View File

@ -234,8 +234,8 @@ macro_rules! index_impl(
impl<N> Index<(usize, usize)> for $t<N> {
type Output = N;
fn index(&self, i: &(usize, usize)) -> &N {
&self.submat[*i]
fn index(&self, i: (usize, usize)) -> &N {
&self.submat[i]
}
}
)

View File

@ -26,14 +26,14 @@ impl<N> Index<usize> for vec::Vec0<N> {
type Output = N;
#[inline]
fn index(&self, _: &usize) -> &N {
fn index(&self, _: usize) -> &N {
panic!("Canot index a Vec0.")
}
}
impl<N> IndexMut<usize> for vec::Vec0<N> {
#[inline]
fn index_mut(&mut self, _: &usize) -> &mut N {
fn index_mut(&mut self, _: usize) -> &mut N {
panic!("Canot index a Vec0.")
}
}

View File

@ -228,14 +228,14 @@ macro_rules! index_impl(
impl<N> Index<usize> for $t<N> {
type Output = N;
fn index(&self, i: &usize) -> &N {
&self.as_array()[*i]
fn index(&self, i: usize) -> &N {
&self.as_array()[i]
}
}
impl<N> IndexMut<usize> for $t<N> {
fn index_mut(&mut self, i: &usize) -> &mut N {
&mut self.as_array_mut()[*i]
fn index_mut(&mut self, i: usize) -> &mut N {
&mut self.as_array_mut()[i]
}
}
)

View File

@ -142,6 +142,7 @@ impl<LV: Neg<Output = LV> + Copy, AV, M: Rotation<AV> + Translation<LV>> Rotatio
/// Trait of transformation having a rotation extractable as a rotation matrix. This can typically
/// be implemented by quaternions to convert them to a rotation matrix.
pub trait RotationMatrix<N, LV, AV> : Rotation<AV> {
/// The output rotation matrix type.
type Output: Mat<N, LV, LV> + Rotation<AV>;
/// Gets the rotation matrix represented by `self`.
@ -230,6 +231,7 @@ pub trait Norm<N: BaseFloat> {
* Trait of elements having a cross product.
*/
pub trait Cross {
/// The cross product output.
type Output;
/// Computes the cross product between two elements (usually vectors).

View File

@ -1,6 +1,6 @@
#![cfg(feature="arbitrary")]
extern crate "nalgebra" as na;
extern crate nalgebra as na;
extern crate quickcheck;
extern crate rand;

View File

@ -1,4 +1,4 @@
extern crate "nalgebra" as na;
extern crate nalgebra as na;
extern crate rand;
use rand::random;

View File

@ -1,4 +1,4 @@
extern crate "nalgebra" as na;
extern crate nalgebra as na;
extern crate rand;
use na::{Pnt3, Vec3, Rot3, UnitQuat, Rotation};

View File

@ -1,4 +1,4 @@
extern crate "nalgebra" as na;
extern crate nalgebra as na;
extern crate rand;
use rand::random;