cone_inter.c
Go to the documentation of this file.
1 /* Jan.17,1992. Bug fix. Set small coeficient be zero. */
2 #include "arith.h"
3 
5 float x[MAX][MAXRANK];
6 int n;
7 float w[MAXEDGE][MAXRANK];
8 {
9  int i,j,en;
10  MATRIX dx;
11  REAL dw[MAXRANK][MAXEDGE];
12 
13  for(i=0; i<n; i++){
14  for(j=0; j<MAXRANK; j++){
15  dx[i][j]=(double)x[i][j];
16 /* Set small coecifients be zero */
17  if(fabs(dx[i][j])<EPS)
18  dx[i][j]=0;
19  }
20  }
21 
22  en=cone(dx,n,MAXRANK,dw);
23 
24  for(i=0; i<en; i++){
25  for(j=0; j<MAXRANK; j++){
26  if(fabs(dw[j][i])<0.000001)
27  w[i][j]=(float)0.0;
28  else
29  w[i][j]=(float)dw[j][i];
30  }
31  }
32 
33  return(en);
34 }
35 
36 
GLfloat n[6][3]
Definition: cube.c:15
double REAL
Definition: arith.h:25
#define MAXEDGE
Definition: arith.h:14
#define MAX
Definition: arith.h:12
cone(MATRIX x, int n, int p, w)
Definition: cone.c:3
#define MAXRANK
Definition: arith.h:13
VECTOR MATRIX[MAX]
Definition: arith.h:27
cone_inter(x, int n, w)
Definition: cone_inter.c:4
#define EPS
Definition: arith.h:15


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 20:00:43