xyzvec/
lib.rs

1pub mod xy;
2pub mod xyz;
3// TODO: comments / doctest
4// TODO: tests with f64, f32, fixed point
5// TODO: checked operations
6// TODO: fixed point support
7// TODO: SIMD support
8// TODO: approximate equality for fixed point?
9// TODO: add relative_eq for tuples for simpler assertions
10
11use std::{
12    fmt::{Debug, Display},
13    ops::{Add, AddAssign, Div, Mul, Neg, Sub, SubAssign},
14};
15
16pub use xy::XYVec;
17pub use xyz::XYZVec;
18
19pub trait CordicPhantomTrait {}
20impl<Frac> CordicPhantomTrait for fixed::FixedI8<Frac> {}
21impl<Frac> CordicPhantomTrait for fixed::FixedI16<Frac> {}
22impl<Frac> CordicPhantomTrait for fixed::FixedI32<Frac> {}
23impl<Frac> CordicPhantomTrait for fixed::FixedI64<Frac> {}
24
25pub trait VecInner:
26    Clone
27    + Copy
28    + Sized
29    + Debug
30    + Display
31    + Add<Output = Self>
32    + AddAssign
33    + Sub<Output = Self>
34    + SubAssign
35    + Mul<Output = Self>
36    + Div<Output = Self>
37    + Neg<Output = Self>
38{
39}
40impl<
41        V: Clone
42            + Copy
43            + Sized
44            + Debug
45            + Display
46            + Add<Output = Self>
47            + AddAssign
48            + Sub<Output = Self>
49            + SubAssign
50            + Mul<Output = Self>
51            + Div<Output = Self>
52            + Neg<Output = Self>,
53    > VecInner for V
54{
55}