logo

Crate wmath

source · []
Expand description

Math library with adapters.

Module :: wmath experimental rust-status docs.rs Open in Gitpod

discord

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.

Dependencies.

Exposed namespace of the module.

Orphan namespace of the module.

Prelude to use essentials: use my_module::prelude::*.

Protected namespace of the module.

Structs

Vector X2

Traits

Angles and their associated trigonometric functions.

An array containing elements of type Element

Trait to interpret canonical math data structures of other math libs as their analogs in cgmath to use operations of cgmath.

Trait for non-canonical structure to clone math data structures of other math libs as their analogs in cgmath to use operations of cgmath.

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..

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..

Trait to interpret canonical math data structures of other math libs as their analogs in nalgebra to use operations of nalgebra.

Trait for non-canonical structure to clone math data structures of other math libs as their analogs in nalgebra to use operations of nalgebra.

Numbers which have upper and lower bounds

Element-wise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties.

Points in a Euclidean space with an associated space of displacement vectors.

Local implementation of trait From.

Vectors that also have a dot (or inner) product.

Local implementation of trait Into.

A column-major matrix of arbitrary dimensions.

A type with a distance function between values.

Implement check is it nan and constructor with NAN value.

Defines a multiplicative identity element for Self.

A trait for a generic rotation. A rotation is a transformation that creates a circular motion, and preserves at least one point in the space.

A two-dimensional rotation.

A three-dimensional rotation.

Traits any element of a vector should implement.

A column-major major matrix where the rows and column vectors are of the same dimensions.

A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which

Vectors that can be added together and multiplied by scalars.

Standard interface of vector X2. Implements nominal interface, extending it by constructor make.

Interface of vector X2 for structures with the canonical layout.

Nominal interface of vector X2.

Nominal interface of vector X2.

Defines an additive identity element for Self.