parent
b6090042ac
commit
03eda09084
|
@ -42,6 +42,7 @@ fn main() {
|
||||||
and keeps an optimized set of tools for computational graphics and physics. Those features include:
|
and keeps an optimized set of tools for computational graphics and physics. Those features include:
|
||||||
|
|
||||||
* Vectors with static sizes: `Vec0`, `Vec1`, `Vec2`, `Vec3`, `Vec4`, `Vec5`, `Vec6`.
|
* Vectors with static sizes: `Vec0`, `Vec1`, `Vec2`, `Vec3`, `Vec4`, `Vec5`, `Vec6`.
|
||||||
|
* Points with static sizes: `Pnt0`, `Pnt1`, `Pnt2`, `Pnt3`, `Pnt4`, `Pnt5`, `Pnt6`.
|
||||||
* Square matrices with static sizes: `Mat1`, `Mat2`, `Mat3`, `Mat4`, `Mat5`, `Mat6 `.
|
* Square matrices with static sizes: `Mat1`, `Mat2`, `Mat3`, `Mat4`, `Mat5`, `Mat6 `.
|
||||||
* Rotation matrices: `Rot2`, `Rot3`, `Rot4`.
|
* Rotation matrices: `Rot2`, `Rot3`, `Rot4`.
|
||||||
* Isometries: `Iso2`, `Iso3`, `Iso4`.
|
* Isometries: `Iso2`, `Iso3`, `Iso4`.
|
||||||
|
@ -87,7 +88,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
|
||||||
* [nphysics](https://github.com/sebcrozet/nphysics): a real-time physics engine.
|
* [nphysics](https://github.com/sebcrozet/nphysics): a real-time physics engine.
|
||||||
* [ncollide](https://github.com/sebcrozet/ncollide): a collision detection library.
|
* [ncollide](https://github.com/sebcrozet/ncollide): a collision detection library.
|
||||||
* [kiss3d](https://github.com/sebcrozet/kiss3d): a minimalistic graphics engine.
|
* [kiss3d](https://github.com/sebcrozet/kiss3d): a minimalistic graphics engine.
|
||||||
* [frog](https://github.com/natal/frog): a machine learning library.
|
* [nrays](https://github.com/sebcrozet/nrays): a ray tracer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![deny(non_camel_case_types)]
|
#![deny(non_camel_case_types)]
|
||||||
|
|
|
@ -55,6 +55,7 @@ macro_rules! pnt_sub_vec_impl(
|
||||||
macro_rules! pnt_as_vec_impl(
|
macro_rules! pnt_as_vec_impl(
|
||||||
($t: ident, $tv: ident, $comp0: ident $(,$compN: ident)*) => (
|
($t: ident, $tv: ident, $comp0: ident $(,$compN: ident)*) => (
|
||||||
impl<N> $t<N> {
|
impl<N> $t<N> {
|
||||||
|
/// Converts this point to its associated vector.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn to_vec(self) -> $tv<N> {
|
pub fn to_vec(self) -> $tv<N> {
|
||||||
$tv::new(
|
$tv::new(
|
||||||
|
@ -63,6 +64,7 @@ macro_rules! pnt_as_vec_impl(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Converts a reference to this point to a reference to its associated vector.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn as_vec<'a>(&'a self) -> &'a $tv<N> {
|
pub fn as_vec<'a>(&'a self) -> &'a $tv<N> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -361,7 +361,7 @@ impl<N, T: Div<N, T>> ScalarDiv<N> for T {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Trait of objects implementing the $$y = ax + y$$ operation.
|
/// Trait of objects implementing the `y = ax + y` operation.
|
||||||
pub trait Axpy<N> {
|
pub trait Axpy<N> {
|
||||||
/// Adds $$a * x$$ to `self`.
|
/// Adds $$a * x$$ to `self`.
|
||||||
fn axpy(&mut self, a: &N, x: &Self);
|
fn axpy(&mut self, a: &N, x: &Self);
|
||||||
|
|
Loading…
Reference in New Issue