contrib
contact
clib
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
s
short s
Definition:
structsize.c:2
arith.h
srot
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
REAL
double REAL
Definition:
arith.h:25
MATRIX
VECTOR MATRIX[MAX]
Definition:
arith.h:27
ix
static int ix
Definition:
printer.c:29
n
GLfloat n[6][3]
Definition:
cube.c:15
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43