ndarray_cg/vector/vec3/general.rs
1mod private
2{
3 use crate::*;
4 use vector::arithmetics::inner_product::*;
5
6 impl< E : MatEl + NdFloat > Vector< E, 3 >
7 {
8 #[ inline ]
9 pub fn x( &self ) -> E
10 {
11 self.0[ 0 ]
12 }
13
14 #[ inline ]
15 pub fn y( &self ) -> E
16 {
17 self.0[ 1 ]
18 }
19
20 #[ inline ]
21 pub fn z( &self ) -> E
22 {
23 self.0[ 2 ]
24 }
25
26 pub fn cross( self, rhs : Self ) -> Self
27 {
28 cross( &self, &rhs )
29 }
30 }
31}
32
33crate::mod_interface!
34{
35
36}