Expand description
Math library with adapters.
§Module :: wmath

Math library aggregating several math modules.
§Sample
use wmath::adapter::prelude::*;
let x2_original = wmath::X2::< u8 >( 1, 3 );
println!( "{:?}", x2_original );
/* log : X2(1, 3) */
let x2_to_array = x2_original.clone_as_array();
println!( "{:?}", x2_to_array );
/* log : [1, 3] */
§To add to your project
cargo add wmath
§Try out from the repository
git clone https://github.com/Wandalen/wMath
cd wMath
cd sample/rust/wmath_trivial
cargo run
Re-exports§
pub use ::math_adapter as adapter;
Modules§
- basic
- Basic.
- cgmath
- Implement adapters for
cgmath
. - dependency
- Dependencies.
- exposed
- Exposed namespace of the module.
- nalgebra
- Implement adapters for
nalgebra
. - orphan
- Orphan namespace of the module.
- prelude
- Prelude to use essentials:
use my_module::prelude::*
. - protected
- Protected namespace of the module.
- traits
- Numeric traits for generic mathematics
Macros§
- braces_
unwrap - Unwrap braces of token tree and pass its content to the passed callback. If token tree in not braced then it passed to callback as is.
- for_
each - Module :: for_each
- impl_
rented_ op1 - Declare operation with 1 operand renting its implementation from math lib of choice.
- impl_
rented_ op2 - Declare operation with 2 operands renting its implementation from math lib of choice.
- impl_
vector_ deref - Implement dereferencing of regular math object to math objects of math lib of choice.
Structs§
- X2
- Vector X2
Traits§
- Array
- An array containing elements of type
Element
- AsCgmath
Canonical Interface - Trait to interpret canonical math data structures of other math libs as their analogs in cgmath to use operations of cgmath.
- AsCgmath
NonCanonical Interface - Trait for non-canonical structure to clone math data structures of other math libs as their analogs in cgmath to use operations of cgmath.
- AsForeign
Canonical Interface - Trait to interpret canonical math data structures of other math libs as their analogs a math lib of choice to use operations of the library..
- AsForeign
NonCanonical Interface - Trait to interpret non-canonical math data structures of other math libs as their analogs a math lib of choice to use operations of the library..
- AsNalgebra
Canonical Interface - Trait to interpret canonical math data structures of other math libs as their analogs in nalgebra to use operations of nalgebra.
- AsNalgebra
NonCanonical Interface - Trait for non-canonical structure to clone math data structures of other math libs as their analogs in nalgebra to use operations of nalgebra.
- From2
- Local implementation of trait From.
- Into2
- Local implementation of trait Into.
- NanLike
Interface - Implement check is it nan and constructor with NAN value.
- Scalar
Interface - Traits any element of a vector should implement.
- X2Basic
Interface - Standard interface of vector X2. Implements nominal interface, extending it by constructor
make
. - X2Canonical
Interface - Interface of vector X2 for structures with the canonical layout.
- X2Interface
- Nominal interface of vector X2.
- X2Nominal
Interface - Nominal interface of vector X2.