devela/num/alg/linear/vector/vec/
methods.rs#![allow(clippy::needless_range_loop)]
use super::super::VecVector;
use crate::data::Vec;
impl<T> VecVector<T> {
pub const fn new(coords: Vec<T>) -> Self {
Self { coords }
}
}
macro_rules! impl_vector {
(int $($t:ty),+) => { $( impl_vector![@int $t]; )+ };
(@int $t:ty) => {
impl VecVector<$t> {
}
};
(float $($t:ty),+) => { $( impl_vector![@float $t]; )+ };
(@float $t:ty) => {
impl VecVector<$t> {
}
};
}
impl_vector![int u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128, isize];
impl_vector![float f32, f64];