srot.c
Go to the documentation of this file.
1 /* applies a plane rotation
2  May,23,1988 */
3 
4 #include "arith.h"
5 
6 srot(n,sx,isx,jsx,incx,sy,isy,jsy,incy,c,s)
7 MATRIX sx,sy;
8 REAL c,s;
9 int n,incx,incy,isx,jsx,isy,jsy;
10 {
11  REAL stemp;
12  int i,ix,iy;
13 
14  if(n <= 0)
15  return;
16 
17  if((incx != 1) || (incy != 1)){
18 
19  /* code for unequal increments or equal increments
20  not equal to 1 */
21 /*
22  ix=1;
23  iy=1;
24  if(incx < 0)
25  ix= (-n+1)*incx+1;
26  if(incy < 0)
27  iy= (-n+1)*incy+1;
28  for(i=1; i<=n; i++){
29  stemp= c*sx[ix]+s*sy[iy];
30  sy[iy]= c*sy[iy]-s*sx[ix];
31  sx[ix]= stemp;
32  ix= ix+incx;
33  iy= iy+incy;
34  }
35 */
36  return;
37  }
38 
39 /* code for both increments equal to 1 */
40 
41  for(i=0; i<n; i++){
42  stemp= c*sx[isx+i][jsx]+s*sy[isy+i][jsy];
43  sy[isy+i][jsy]= c*sy[isy+i][jsy]-s*sx[isx+i][jsx];
44  sx[isx+i][jsx]=stemp;
45  }
46 
47  return;
48 }
49 
50 
51 
GLfloat n[6][3]
Definition: cube.c:15
double REAL
Definition: arith.h:25
short s
Definition: structsize.c:2
VECTOR MATRIX[MAX]
Definition: arith.h:27
static int ix
Definition: printer.c:29
srot(int n, MATRIX sx, int isx, int jsx, int incx, MATRIX sy, int isy, int jsy, int incy, REAL c, REAL s)
Definition: srot.c:6


euslisp
Author(s): Toshihiro Matsui
autogenerated on Mon Feb 28 2022 22:18:28