forked from M-Labs/nalgebra
Update to the last rust-nighly.
Version of rustc: rustc 1.0.0-nightly (123a754cb 2015-03-24).
This commit is contained in:
parent
77217a61d6
commit
0988b837dc
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nalgebra"
|
name = "nalgebra"
|
||||||
version = "0.2.6"
|
version = "0.2.7"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ] # FIXME: add the contributors.
|
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."
|
description = "Linear algebra library for computer physics, computer graphics and general low-dimensional linear algebra for Rust."
|
||||||
|
@ -85,9 +85,10 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
|
|||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
#![feature(std_misc)]
|
#![feature(std_misc)]
|
||||||
|
#![feature(test)]
|
||||||
#![doc(html_root_url = "http://nalgebra.org/doc")]
|
#![doc(html_root_url = "http://nalgebra.org/doc")]
|
||||||
|
|
||||||
extern crate "rustc-serialize" as rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
#[cfg(feature="arbitrary")]
|
#[cfg(feature="arbitrary")]
|
||||||
|
@ -264,7 +264,7 @@ impl<N> Shape<(usize, usize)> for DMat<N> {
|
|||||||
impl<N> Index<(usize, usize)> for DMat<N> {
|
impl<N> Index<(usize, usize)> for DMat<N> {
|
||||||
type Output = 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!(i < self.nrows);
|
||||||
assert!(j < self.ncols);
|
assert!(j < self.ncols);
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ impl<N> Index<(usize, usize)> for DMat<N> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<N> IndexMut<(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!(i < self.nrows);
|
||||||
assert!(j < self.ncols);
|
assert!(j < self.ncols);
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ macro_rules! dvec_impl(
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
unsafe fn unsafe_at(&self, i: usize) -> N {
|
unsafe fn unsafe_at(&self, i: usize) -> N {
|
||||||
*self.at.as_slice().get_unchecked(i)
|
*self.at[..].get_unchecked(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
@ -80,14 +80,14 @@ macro_rules! dvec_impl(
|
|||||||
impl<N> Index<usize> for $dvec<N> {
|
impl<N> Index<usize> for $dvec<N> {
|
||||||
type Output = N;
|
type Output = N;
|
||||||
|
|
||||||
fn index(&self, i: &usize) -> &N {
|
fn index(&self, i: usize) -> &N {
|
||||||
&self.as_slice()[*i]
|
&self.as_slice()[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> IndexMut<usize> for $dvec<N> {
|
impl<N> IndexMut<usize> for $dvec<N> {
|
||||||
fn index_mut(&mut self, i: &usize) -> &mut N {
|
fn index_mut(&mut self, i: usize) -> &mut N {
|
||||||
&mut self.as_mut_slice()[*i]
|
&mut self.as_mut_slice()[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ macro_rules! index_impl(
|
|||||||
impl<N> Index<(usize, usize)> for $t<N> {
|
impl<N> Index<(usize, usize)> for $t<N> {
|
||||||
type Output = N;
|
type Output = N;
|
||||||
|
|
||||||
fn index(&self, &(i, j): &(usize, usize)) -> &N {
|
fn index(&self, (i, j): (usize, usize)) -> &N {
|
||||||
unsafe {
|
unsafe {
|
||||||
&mem::transmute::<&$t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
|
&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> {
|
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 {
|
unsafe {
|
||||||
&mut mem::transmute::<&mut $t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
|
&mut mem::transmute::<&mut $t<N>, &mut [N; $dim * $dim]>(self)[i + j * $dim]
|
||||||
}
|
}
|
||||||
|
@ -234,8 +234,8 @@ macro_rules! index_impl(
|
|||||||
impl<N> Index<(usize, usize)> for $t<N> {
|
impl<N> Index<(usize, usize)> for $t<N> {
|
||||||
type Output = N;
|
type Output = N;
|
||||||
|
|
||||||
fn index(&self, i: &(usize, usize)) -> &N {
|
fn index(&self, i: (usize, usize)) -> &N {
|
||||||
&self.submat[*i]
|
&self.submat[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -26,14 +26,14 @@ impl<N> Index<usize> for vec::Vec0<N> {
|
|||||||
type Output = N;
|
type Output = N;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn index(&self, _: &usize) -> &N {
|
fn index(&self, _: usize) -> &N {
|
||||||
panic!("Canot index a Vec0.")
|
panic!("Canot index a Vec0.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> IndexMut<usize> for vec::Vec0<N> {
|
impl<N> IndexMut<usize> for vec::Vec0<N> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn index_mut(&mut self, _: &usize) -> &mut N {
|
fn index_mut(&mut self, _: usize) -> &mut N {
|
||||||
panic!("Canot index a Vec0.")
|
panic!("Canot index a Vec0.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,14 +228,14 @@ macro_rules! index_impl(
|
|||||||
impl<N> Index<usize> for $t<N> {
|
impl<N> Index<usize> for $t<N> {
|
||||||
type Output = N;
|
type Output = N;
|
||||||
|
|
||||||
fn index(&self, i: &usize) -> &N {
|
fn index(&self, i: usize) -> &N {
|
||||||
&self.as_array()[*i]
|
&self.as_array()[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<N> IndexMut<usize> for $t<N> {
|
impl<N> IndexMut<usize> for $t<N> {
|
||||||
fn index_mut(&mut self, i: &usize) -> &mut N {
|
fn index_mut(&mut self, i: usize) -> &mut N {
|
||||||
&mut self.as_array_mut()[*i]
|
&mut self.as_array_mut()[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -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
|
/// 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.
|
/// be implemented by quaternions to convert them to a rotation matrix.
|
||||||
pub trait RotationMatrix<N, LV, AV> : Rotation<AV> {
|
pub trait RotationMatrix<N, LV, AV> : Rotation<AV> {
|
||||||
|
/// The output rotation matrix type.
|
||||||
type Output: Mat<N, LV, LV> + Rotation<AV>;
|
type Output: Mat<N, LV, LV> + Rotation<AV>;
|
||||||
|
|
||||||
/// Gets the rotation matrix represented by `self`.
|
/// Gets the rotation matrix represented by `self`.
|
||||||
@ -230,6 +231,7 @@ pub trait Norm<N: BaseFloat> {
|
|||||||
* Trait of elements having a cross product.
|
* Trait of elements having a cross product.
|
||||||
*/
|
*/
|
||||||
pub trait Cross {
|
pub trait Cross {
|
||||||
|
/// The cross product output.
|
||||||
type Output;
|
type Output;
|
||||||
|
|
||||||
/// Computes the cross product between two elements (usually vectors).
|
/// Computes the cross product between two elements (usually vectors).
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#![cfg(feature="arbitrary")]
|
#![cfg(feature="arbitrary")]
|
||||||
|
|
||||||
extern crate "nalgebra" as na;
|
extern crate nalgebra as na;
|
||||||
extern crate quickcheck;
|
extern crate quickcheck;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extern crate "nalgebra" as na;
|
extern crate nalgebra as na;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
use rand::random;
|
use rand::random;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extern crate "nalgebra" as na;
|
extern crate nalgebra as na;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
use na::{Pnt3, Vec3, Rot3, UnitQuat, Rotation};
|
use na::{Pnt3, Vec3, Rot3, UnitQuat, Rotation};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
extern crate "nalgebra" as na;
|
extern crate nalgebra as na;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
use rand::random;
|
use rand::random;
|
||||||
|
Loading…
Reference in New Issue
Block a user