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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// devela::num::lin::vector
//
//! Linear algebra vectors.
//!
//! Vectors represent the difference between two positions.
//!
//! They are characterized by their *direction* and *magnitude*, and
//! their direction can be decomposed into *orientation* and *sense*.
//
use crateNum;
// #[cfg(feature = "alloc")]
// use crate::{Box, NumError, NumResult as Result, Vec};
/* types */
/// A static `D`-dimensional vector, backed by a primitive [`array`][prim@array].
/// A static 2-dimensional vector.
pub type Vector2d<T> = ;
/// A static 3-dimensional vector.
pub type Vector3d<T> = ;
// #[doc = crate::_tags!(lin)]
// /// A dynamic vector, backed by a primitive [`Vec`].
// #[doc = crate::_doc_location!("num/lin")]
// #[repr(transparent)]
// #[cfg(feature = "alloc")]
// #[cfg_attr(nightly_doc, doc(cfg(feature = "alloc")))]
// pub struct VecVector<T> {
// /// The vector coordinates in some basis.
// pub coords: Vec<T>,
// }
/* trait */
/// A common trait for all vectors.
// #[cfg(feature = "alloc")]
// #[cfg_attr(nightly_doc, doc(cfg(feature = "alloc")))]
// impl<T: Num + 'static, const D: usize>
// TryInto<Box<dyn NumVector<Scalar = T, Rhs = Self, Inner = [T; D], Out = Self>>>
// for Vector<T, D>
// {
// type Error = NumError;
//
// fn try_into(
// self,
// ) -> Result<Box<dyn NumVector<Scalar = T, Rhs = Self, Inner = [T; D], Out = Self>>> {
// Ok(Box::new(self))
// }
// }