NX is determined whether the secondary development -UFUN parallel (two-dimensional vector) UF_VEC2_is_parallel the two vectors specified tolerance

. 1 NX11 + VS2013
 2  
. 3 #include <uf.h>
 . 4 #include <uf_vec.h>
 . 5 #include <uf_ui.h>
 . 6  
. 7  
. 8  UF_initialize ();
 . 9  
10  // determine whether the two vectors in parallel within the specified tolerance (two-dimensional vector) 
. 11  const  Double vec1 [ 2 ] = { 0.0 , 1.0 }; // vector. 1 
12 is  const  Double vec2 [ 2 ] = { 0.0 , 1.0 }; // vector 2 
13 is  Double Tolerance = from 0.001 ;// tolerance 
14  int is_parallel = 0 ; // 0 vector is not parallel to a parallel vector 
15 UF_VEC2_is_parallel (vec1, vec2, Tolerance, & is_parallel);
 16  
. 17  // print 
18 is  char MSG [ 256 ];
 . 19 sprintf_s (MSG, " % D " , is_parallel);
 20 is uc1601 (MSG, . 1 );
 21 is  
22 is  UF_terminate ();
 23 is  
24  Caesar Lushang Yu
 25 15 February 2020

Guess you like

Origin www.cnblogs.com/nxopen2018/p/12313555.html