/ /   T y p e :   U n i t y E n g i n e . V e c t o r 3 d 
 
 / /   A s s e m b l y :   U n i t y E n g i n e ,   V e r s i o n = 0 . 0 . 0 . 0 ,   C u l t u r e = n e u t r a l ,   P u b l i c K e y T o k e n = n u l l 
 
 / /   A s s e m b l y   l o c a t i o n :   C : \ P r o g r a m   F i l e s   ( x 8 6 ) \ U n i t y \ E d i t o r \ D a t a \ M a n a g e d \ U n i t y E n g i n e . d l l 
 
 u s i n g   S y s t e m ; 
 
 u s i n g   S y s t e m . R u n t i m e . C o m p i l e r S e r v i c e s ; 
 
 
 
 n a m e s p a c e   U n i t y E n g i n e   { 
 
         p u b l i c   s t r u c t   V e c t o r 3 d   { 
 
                 p u b l i c   c o n s t   f l o a t   k E p s i l o n   =   1 E - 0 5 f ; 
 
                 p u b l i c   d o u b l e   x ; 
 
                 p u b l i c   d o u b l e   y ; 
 
                 p u b l i c   d o u b l e   z ; 
 
 
 
                 p u b l i c   d o u b l e   t h i s [ i n t   i n d e x ]   { 
 
                         g e t   { 
 
                                 s w i t c h   ( i n d e x )   { 
 
                                         c a s e   0 : 
 
                                                 r e t u r n   t h i s . x ; 
 
                                         c a s e   1 : 
 
                                                 r e t u r n   t h i s . y ; 
 
                                         c a s e   2 : 
 
                                                 r e t u r n   t h i s . z ; 
 
                                         d e f a u l t : 
 
                                                 t h r o w   n e w   I n d e x O u t O f R a n g e E x c e p t i o n ( " I n v a l i d   i n d e x ! " ) ; 
 
                                 } 
 
                         } 
 
                         s e t   { 
 
                                 s w i t c h   ( i n d e x )   { 
 
                                         c a s e   0 : 
 
                                                 t h i s . x   =   v a l u e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   1 : 
 
                                                 t h i s . y   =   v a l u e ; 
 
                                                 b r e a k ; 
 
                                         c a s e   2 : 
 
                                                 t h i s . z   =   v a l u e ; 
 
                                                 b r e a k ; 
 
                                         d e f a u l t : 
 
                                                 t h r o w   n e w   I n d e x O u t O f R a n g e E x c e p t i o n ( " I n v a l i d   V e c t o r 3 d   i n d e x ! " ) ; 
 
                                 } 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   V e c t o r 3 d   n o r m a l i z e d   { 
 
                         g e t   { 
 
                                 r e t u r n   V e c t o r 3 d . N o r m a l i z e ( t h i s ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   d o u b l e   m a g n i t u d e   { 
 
                         g e t   { 
 
                                 r e t u r n   M a t h . S q r t ( t h i s . x   *   t h i s . x   +   t h i s . y   *   t h i s . y   +   t h i s . z   *   t h i s . z ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   d o u b l e   s q r M a g n i t u d e   { 
 
                         g e t   { 
 
                                 r e t u r n   t h i s . x   *   t h i s . x   +   t h i s . y   *   t h i s . y   +   t h i s . z   *   t h i s . z ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   z e r o   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   0 d ,   0 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o n e   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 1 d ,   1 d ,   1 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   f o r w a r d   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   0 d ,   1 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   b a c k   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   0 d ,   - 1 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   u p   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   1 d ,   0 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   d o w n   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   - 1 d ,   0 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   l e f t   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( - 1 d ,   0 d ,   0 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   r i g h t   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 1 d ,   0 d ,   0 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 [ O b s o l e t e ( " U s e   V e c t o r 3 d . f o r w a r d   i n s t e a d . " ) ] 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   f w d   { 
 
                         g e t   { 
 
                                 r e t u r n   n e w   V e c t o r 3 d ( 0 d ,   0 d ,   1 d ) ; 
 
                         } 
 
                 } 
 
 
 
                 p u b l i c   V e c t o r 3 d ( d o u b l e   x ,   d o u b l e   y ,   d o u b l e   z )   { 
 
                         t h i s . x   =   x ; 
 
                         t h i s . y   =   y ; 
 
                         t h i s . z   =   z ; 
 
                 } 
 
 
 
                 p u b l i c   V e c t o r 3 d ( f l o a t   x ,   f l o a t   y ,   f l o a t   z )   { 
 
                         t h i s . x   =   ( d o u b l e ) x ; 
 
                         t h i s . y   =   ( d o u b l e ) y ; 
 
                         t h i s . z   =   ( d o u b l e ) z ; 
 
                 } 
 
 
 
                 p u b l i c   V e c t o r 3 d ( V e c t o r 3   v 3 )   { 
 
                         t h i s . x   =   ( d o u b l e ) v 3 . x ; 
 
                         t h i s . y   =   ( d o u b l e ) v 3 . y ; 
 
                         t h i s . z   =   ( d o u b l e ) v 3 . z ; 
 
                 } 
 
 
 
                 p u b l i c   V e c t o r 3 d ( d o u b l e   x ,   d o u b l e   y )   { 
 
                         t h i s . x   =   x ; 
 
                         t h i s . y   =   y ; 
 
                         t h i s . z   =   0 d ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   + ( V e c t o r 3 d   a ,   V e c t o r 3 d   b )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   +   b . x ,   a . y   +   b . y ,   a . z   +   b . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   - ( V e c t o r 3 d   a ,   V e c t o r 3 d   b )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   -   b . x ,   a . y   -   b . y ,   a . z   -   b . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   - ( V e c t o r 3 d   a )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( - a . x ,   - a . y ,   - a . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   * ( V e c t o r 3 d   a ,   d o u b l e   d )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   *   d ,   a . y   *   d ,   a . z   *   d ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   * ( d o u b l e   d ,   V e c t o r 3 d   a )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   *   d ,   a . y   *   d ,   a . z   *   d ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   o p e r a t o r   / ( V e c t o r 3 d   a ,   d o u b l e   d )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   /   d ,   a . y   /   d ,   a . z   /   d ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   b o o l   o p e r a t o r   = = ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   ( d o u b l e ) V e c t o r 3 d . S q r M a g n i t u d e ( l h s   -   r h s )   <   0 . 0   /   1 . 0 ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   b o o l   o p e r a t o r   ! = ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   ( d o u b l e ) V e c t o r 3 d . S q r M a g n i t u d e ( l h s   -   r h s )   > =   0 . 0   /   1 . 0 ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   e x p l i c i t   o p e r a t o r   V e c t o r 3 ( V e c t o r 3 d   v e c t o r 3 d )   { 
 
                         r e t u r n   n e w   V e c t o r 3 ( ( f l o a t ) v e c t o r 3 d . x ,   ( f l o a t ) v e c t o r 3 d . y ,   ( f l o a t ) v e c t o r 3 d . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   L e r p ( V e c t o r 3 d   f r o m ,   V e c t o r 3 d   t o ,   d o u b l e   t )   { 
 
                         t   =   M a t h d . C l a m p 0 1 ( t ) ; 
 
                         r e t u r n   n e w   V e c t o r 3 d ( f r o m . x   +   ( t o . x   -   f r o m . x )   *   t ,   f r o m . y   +   ( t o . y   -   f r o m . y )   *   t ,   f r o m . z   +   ( t o . z   -   f r o m . z )   *   t ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   S l e r p ( V e c t o r 3 d   f r o m ,   V e c t o r 3 d   t o ,   d o u b l e   t )   { 
 
                         V e c t o r 3   v 3   =   V e c t o r 3 . S l e r p ( ( V e c t o r 3 ) f r o m ,   ( V e c t o r 3 ) t o ,   ( f l o a t ) t ) ; 
 
                         r e t u r n   n e w   V e c t o r 3 d ( v 3 ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   v o i d   O r t h o N o r m a l i z e ( r e f   V e c t o r 3 d   n o r m a l ,   r e f   V e c t o r 3 d   t a n g e n t )   { 
 
                         V e c t o r 3   v 3 n o r m a l   =   n e w   V e c t o r 3 ( ) ; 
 
                         V e c t o r 3   v 3 t a n g e n t   =   n e w   V e c t o r 3 ( ) ; 
 
                         v 3 n o r m a l   =   ( V e c t o r 3 ) n o r m a l ; 
 
                         v 3 t a n g e n t   =   ( V e c t o r 3 ) t a n g e n t ; 
 
                         V e c t o r 3 . O r t h o N o r m a l i z e ( r e f   v 3 n o r m a l ,   r e f   v 3 t a n g e n t ) ; 
 
                         n o r m a l   =   n e w   V e c t o r 3 d ( v 3 n o r m a l ) ; 
 
                         t a n g e n t   =   n e w   V e c t o r 3 d ( v 3 t a n g e n t ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   v o i d   O r t h o N o r m a l i z e ( r e f   V e c t o r 3 d   n o r m a l ,   r e f   V e c t o r 3 d   t a n g e n t ,   r e f   V e c t o r 3 d   b i n o r m a l )   { 
 
                         V e c t o r 3   v 3 n o r m a l   =   n e w   V e c t o r 3 ( ) ; 
 
                         V e c t o r 3   v 3 t a n g e n t   =   n e w   V e c t o r 3 ( ) ; 
 
                         V e c t o r 3   v 3 b i n o r m a l   =   n e w   V e c t o r 3 ( ) ; 
 
                         v 3 n o r m a l   =   ( V e c t o r 3 ) n o r m a l ; 
 
                         v 3 t a n g e n t   =   ( V e c t o r 3 ) t a n g e n t ; 
 
                         v 3 b i n o r m a l   =   ( V e c t o r 3 ) b i n o r m a l ; 
 
                         V e c t o r 3 . O r t h o N o r m a l i z e ( r e f   v 3 n o r m a l ,   r e f   v 3 t a n g e n t ,   r e f   v 3 b i n o r m a l ) ; 
 
                         n o r m a l   =   n e w   V e c t o r 3 d ( v 3 n o r m a l ) ; 
 
                         t a n g e n t   =   n e w   V e c t o r 3 d ( v 3 t a n g e n t ) ; 
 
                         b i n o r m a l   =   n e w   V e c t o r 3 d ( v 3 b i n o r m a l ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   M o v e T o w a r d s ( V e c t o r 3 d   c u r r e n t ,   V e c t o r 3 d   t a r g e t ,   d o u b l e   m a x D i s t a n c e D e l t a )   { 
 
                         V e c t o r 3 d   v e c t o r 3   =   t a r g e t   -   c u r r e n t ; 
 
                         d o u b l e   m a g n i t u d e   =   v e c t o r 3 . m a g n i t u d e ; 
 
                         i f   ( m a g n i t u d e   < =   m a x D i s t a n c e D e l t a   | |   m a g n i t u d e   = =   0 . 0 d ) 
 
                                 r e t u r n   t a r g e t ; 
 
                         e l s e 
 
                                 r e t u r n   c u r r e n t   +   v e c t o r 3   /   m a g n i t u d e   *   m a x D i s t a n c e D e l t a ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   R o t a t e T o w a r d s ( V e c t o r 3 d   c u r r e n t ,   V e c t o r 3 d   t a r g e t ,   d o u b l e   m a x R a d i a n s D e l t a ,   d o u b l e   m a x M a g n i t u d e D e l t a )   { 
 
                         V e c t o r 3   v 3   =   V e c t o r 3 . R o t a t e T o w a r d s ( ( V e c t o r 3 ) c u r r e n t ,   ( V e c t o r 3 ) t a r g e t ,   ( f l o a t ) m a x R a d i a n s D e l t a ,   ( f l o a t ) m a x M a g n i t u d e D e l t a ) ; 
 
                         r e t u r n   n e w   V e c t o r 3 d ( v 3 ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   S m o o t h D a m p ( V e c t o r 3 d   c u r r e n t ,   V e c t o r 3 d   t a r g e t ,   r e f   V e c t o r 3 d   c u r r e n t V e l o c i t y ,   d o u b l e   s m o o t h T i m e ,   d o u b l e   m a x S p e e d )   { 
 
                         d o u b l e   d e l t a T i m e   =   ( d o u b l e ) T i m e . d e l t a T i m e ; 
 
                         r e t u r n   V e c t o r 3 d . S m o o t h D a m p ( c u r r e n t ,   t a r g e t ,   r e f   c u r r e n t V e l o c i t y ,   s m o o t h T i m e ,   m a x S p e e d ,   d e l t a T i m e ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   S m o o t h D a m p ( V e c t o r 3 d   c u r r e n t ,   V e c t o r 3 d   t a r g e t ,   r e f   V e c t o r 3 d   c u r r e n t V e l o c i t y ,   d o u b l e   s m o o t h T i m e )   { 
 
                         d o u b l e   d e l t a T i m e   =   ( d o u b l e ) T i m e . d e l t a T i m e ; 
 
                         d o u b l e   m a x S p e e d   =   d o u b l e . P o s i t i v e I n f i n i t y ; 
 
                         r e t u r n   V e c t o r 3 d . S m o o t h D a m p ( c u r r e n t ,   t a r g e t ,   r e f   c u r r e n t V e l o c i t y ,   s m o o t h T i m e ,   m a x S p e e d ,   d e l t a T i m e ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   S m o o t h D a m p ( V e c t o r 3 d   c u r r e n t ,   V e c t o r 3 d   t a r g e t ,   r e f   V e c t o r 3 d   c u r r e n t V e l o c i t y ,   d o u b l e   s m o o t h T i m e ,   d o u b l e   m a x S p e e d ,   d o u b l e   d e l t a T i m e )   { 
 
                         s m o o t h T i m e   =   M a t h d . M a x ( 0 . 0 0 0 1 d ,   s m o o t h T i m e ) ; 
 
                         d o u b l e   n u m 1   =   2 d   /   s m o o t h T i m e ; 
 
                         d o u b l e   n u m 2   =   n u m 1   *   d e l t a T i m e ; 
 
                         d o u b l e   n u m 3   =   ( 1 . 0 d   /   ( 1 . 0 d   +   n u m 2   +   0 . 4 7 9 9 9 9 9 8 9 2 7 1 1 6 4 d   *   n u m 2   *   n u m 2   +   0 . 2 3 4 9 9 9 9 9 9 4 0 3 9 5 4 d   *   n u m 2   *   n u m 2   *   n u m 2 ) ) ; 
 
                         V e c t o r 3 d   v e c t o r   =   c u r r e n t   -   t a r g e t ; 
 
                         V e c t o r 3 d   v e c t o r 3 _ 1   =   t a r g e t ; 
 
                         d o u b l e   m a x L e n g t h   =   m a x S p e e d   *   s m o o t h T i m e ; 
 
                         V e c t o r 3 d   v e c t o r 3 _ 2   =   V e c t o r 3 d . C l a m p M a g n i t u d e ( v e c t o r ,   m a x L e n g t h ) ; 
 
                         t a r g e t   =   c u r r e n t   -   v e c t o r 3 _ 2 ; 
 
                         V e c t o r 3 d   v e c t o r 3 _ 3   =   ( c u r r e n t V e l o c i t y   +   n u m 1   *   v e c t o r 3 _ 2 )   *   d e l t a T i m e ; 
 
                         c u r r e n t V e l o c i t y   =   ( c u r r e n t V e l o c i t y   -   n u m 1   *   v e c t o r 3 _ 3 )   *   n u m 3 ; 
 
                         V e c t o r 3 d   v e c t o r 3 _ 4   =   t a r g e t   +   ( v e c t o r 3 _ 2   +   v e c t o r 3 _ 3 )   *   n u m 3 ; 
 
                         i f   ( V e c t o r 3 d . D o t ( v e c t o r 3 _ 1   -   c u r r e n t ,   v e c t o r 3 _ 4   -   v e c t o r 3 _ 1 )   >   0 . 0 )   { 
 
                                 v e c t o r 3 _ 4   =   v e c t o r 3 _ 1 ; 
 
                                 c u r r e n t V e l o c i t y   =   ( v e c t o r 3 _ 4   -   v e c t o r 3 _ 1 )   /   d e l t a T i m e ; 
 
                         } 
 
                         r e t u r n   v e c t o r 3 _ 4 ; 
 
                 } 
 
 
 
                 p u b l i c   v o i d   S e t ( d o u b l e   n e w _ x ,   d o u b l e   n e w _ y ,   d o u b l e   n e w _ z )   { 
 
                         t h i s . x   =   n e w _ x ; 
 
                         t h i s . y   =   n e w _ y ; 
 
                         t h i s . z   =   n e w _ z ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   S c a l e ( V e c t o r 3 d   a ,   V e c t o r 3 d   b )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( a . x   *   b . x ,   a . y   *   b . y ,   a . z   *   b . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   v o i d   S c a l e ( V e c t o r 3 d   s c a l e )   { 
 
                         t h i s . x   * =   s c a l e . x ; 
 
                         t h i s . y   * =   s c a l e . y ; 
 
                         t h i s . z   * =   s c a l e . z ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   C r o s s ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( l h s . y   *   r h s . z   -   l h s . z   *   r h s . y ,   l h s . z   *   r h s . x   -   l h s . x   *   r h s . z ,   l h s . x   *   r h s . y   -   l h s . y   *   r h s . x ) ; 
 
                 } 
 
 
 
                 p u b l i c   o v e r r i d e   i n t   G e t H a s h C o d e ( )   { 
 
                         r e t u r n   t h i s . x . G e t H a s h C o d e ( )   ^   t h i s . y . G e t H a s h C o d e ( )   < <   2   ^   t h i s . z . G e t H a s h C o d e ( )   > >   2 ; 
 
                 } 
 
 
 
                 p u b l i c   o v e r r i d e   b o o l   E q u a l s ( o b j e c t   o t h e r )   { 
 
                         i f   ( ! ( o t h e r   i s   V e c t o r 3 d ) ) 
 
                                 r e t u r n   f a l s e ; 
 
                         V e c t o r 3 d   v e c t o r 3 d   =   ( V e c t o r 3 d ) o t h e r ; 
 
                         i f   ( t h i s . x . E q u a l s ( v e c t o r 3 d . x )   & &   t h i s . y . E q u a l s ( v e c t o r 3 d . y ) ) 
 
                                 r e t u r n   t h i s . z . E q u a l s ( v e c t o r 3 d . z ) ; 
 
                         e l s e 
 
                                 r e t u r n   f a l s e ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   R e f l e c t ( V e c t o r 3 d   i n D i r e c t i o n ,   V e c t o r 3 d   i n N o r m a l )   { 
 
                         r e t u r n   - 2 d   *   V e c t o r 3 d . D o t ( i n N o r m a l ,   i n D i r e c t i o n )   *   i n N o r m a l   +   i n D i r e c t i o n ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   N o r m a l i z e ( V e c t o r 3 d   v a l u e )   { 
 
                         d o u b l e   n u m   =   V e c t o r 3 d . M a g n i t u d e ( v a l u e ) ; 
 
                         i f   ( n u m   >   9 . 9 9 9 9 9 9 7 4 7 3 7 8 7 5 E - 0 6 ) 
 
                                 r e t u r n   v a l u e   /   n u m ; 
 
                         e l s e 
 
                                 r e t u r n   V e c t o r 3 d . z e r o ; 
 
                 } 
 
 
 
                 p u b l i c   v o i d   N o r m a l i z e ( )   { 
 
                         d o u b l e   n u m   =   V e c t o r 3 d . M a g n i t u d e ( t h i s ) ; 
 
                         i f   ( n u m   >   9 . 9 9 9 9 9 9 7 4 7 3 7 8 7 5 E - 0 6 ) 
 
                                 t h i s   =   t h i s   /   n u m ; 
 
                         e l s e 
 
                                 t h i s   =   V e c t o r 3 d . z e r o ; 
 
                 } 
 
                 / /   T O D O   :   f i x   f o r m a t t i n g 
 
                 p u b l i c   o v e r r i d e   s t r i n g   T o S t r i n g ( )   { 
 
                         r e t u r n   " ( "   +   t h i s . x   +   "   -   "   +   t h i s . y   +   "   -   "   +   t h i s . z   +   " ) " ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   d o u b l e   D o t ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   l h s . x   *   r h s . x   +   l h s . y   *   r h s . y   +   l h s . z   *   r h s . z ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   P r o j e c t ( V e c t o r 3 d   v e c t o r ,   V e c t o r 3 d   o n N o r m a l )   { 
 
                         d o u b l e   n u m   =   V e c t o r 3 d . D o t ( o n N o r m a l ,   o n N o r m a l ) ; 
 
                         i f   ( n u m   <   1 . 4 0 1 2 9 8 4 6 4 3 2 4 8 2 E - 4 5 d ) 
 
                                 r e t u r n   V e c t o r 3 d . z e r o ; 
 
                         e l s e 
 
                                 r e t u r n   o n N o r m a l   *   V e c t o r 3 d . D o t ( v e c t o r ,   o n N o r m a l )   /   n u m ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   E x c l u d e ( V e c t o r 3 d   e x c l u d e T h i s ,   V e c t o r 3 d   f r o m T h a t )   { 
 
                         r e t u r n   f r o m T h a t   -   V e c t o r 3 d . P r o j e c t ( f r o m T h a t ,   e x c l u d e T h i s ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   d o u b l e   A n g l e ( V e c t o r 3 d   f r o m ,   V e c t o r 3 d   t o )   { 
 
                         r e t u r n   M a t h d . A c o s ( M a t h d . C l a m p ( V e c t o r 3 d . D o t ( f r o m . n o r m a l i z e d ,   t o . n o r m a l i z e d ) ,   - 1 d ,   1 d ) )   *   5 7 . 2 9 5 7 8 d ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   d o u b l e   D i s t a n c e ( V e c t o r 3 d   a ,   V e c t o r 3 d   b )   { 
 
                         V e c t o r 3 d   v e c t o r 3 d   =   n e w   V e c t o r 3 d ( a . x   -   b . x ,   a . y   -   b . y ,   a . z   -   b . z ) ; 
 
                         r e t u r n   M a t h . S q r t ( v e c t o r 3 d . x   *   v e c t o r 3 d . x   +   v e c t o r 3 d . y   *   v e c t o r 3 d . y   +   v e c t o r 3 d . z   *   v e c t o r 3 d . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   C l a m p M a g n i t u d e ( V e c t o r 3 d   v e c t o r ,   d o u b l e   m a x L e n g t h )   { 
 
                         i f   ( v e c t o r . s q r M a g n i t u d e   >   m a x L e n g t h   *   m a x L e n g t h ) 
 
                                 r e t u r n   v e c t o r . n o r m a l i z e d   *   m a x L e n g t h ; 
 
                         e l s e 
 
                                 r e t u r n   v e c t o r ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   d o u b l e   M a g n i t u d e ( V e c t o r 3 d   a )   { 
 
                         r e t u r n   M a t h . S q r t ( a . x   *   a . x   +   a . y   *   a . y   +   a . z   *   a . z ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   d o u b l e   S q r M a g n i t u d e ( V e c t o r 3 d   a )   { 
 
                         r e t u r n   a . x   *   a . x   +   a . y   *   a . y   +   a . z   *   a . z ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   M i n ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( M a t h d . M i n ( l h s . x ,   r h s . x ) ,   M a t h d . M i n ( l h s . y ,   r h s . y ) ,   M a t h d . M i n ( l h s . z ,   r h s . z ) ) ; 
 
                 } 
 
 
 
                 p u b l i c   s t a t i c   V e c t o r 3 d   M a x ( V e c t o r 3 d   l h s ,   V e c t o r 3 d   r h s )   { 
 
                         r e t u r n   n e w   V e c t o r 3 d ( M a t h d . M a x ( l h s . x ,   r h s . x ) ,   M a t h d . M a x ( l h s . y ,   r h s . y ) ,   M a t h d . M a x ( l h s . z ,   r h s . z ) ) ; 
 
                 } 
 
 
 
                 [ O b s o l e t e ( " U s e   V e c t o r 3 d . A n g l e   i n s t e a d .   A n g l e B e t w e e n   u s e s   r a d i a n s   i n s t e a d   o f   d e g r e e s   a n d   w a s   d e p r e c a t e d   f o r   t h i s   r e a s o n " ) ] 
 
                 p u b l i c   s t a t i c   d o u b l e   A n g l e B e t w e e n ( V e c t o r 3 d   f r o m ,   V e c t o r 3 d   t o )   { 
 
                         r e t u r n   M a t h d . A c o s ( M a t h d . C l a m p ( V e c t o r 3 d . D o t ( f r o m . n o r m a l i z e d ,   t o . n o r m a l i z e d ) ,   - 1 d ,   1 d ) ) ; 
 
                 } 
 
         } 
 
 } 
 
 