nsys-math-utils 0.9.0

Math types and traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
macro_rules! impl_accessors {
  ( $simplex:ident, $point:ident, $npoints:expr,
    [$(($method:ident, $field:ident)),+]
  ) => {
    impl <S : Copy> $simplex <S> {
      $(
      #[inline]
      pub const fn $method (self) -> $point <S> {
        self.$field
      }
      )+
      #[inline]
      pub const fn points (self) -> [$point <S>; $npoints] {
        [$(self.$field),+]
      }
    }
  }
}