1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#[cfg(debug_assertions)]
macro_rules! cast {
	($v: expr, $t: ty) => {{
		<$t>::try_from($v).unwrap_or_else(|_| ERROR!("Error casting {} to {}", $v, stringify!($t)))
	}};
}
#[cfg(not(debug_assertions))]
macro_rules! cast {
	($v: ident, $t: ty) => {{
		$v as $t
	}};
}

pub trait Cast<T> {
	fn to(val: T) -> Self;
}

pub use matrix::*;
pub mod func;

mod bool;
mod f16;
mod f32;
mod f64;
mod i128;
mod i16;
mod i32;
mod i64;
mod i8;
mod isize;
mod matrix;
mod nalgebra;
mod tuples;
mod u128;
mod u16;
mod u32;
mod u64;
mod u8;
mod usize;
mod vector;