srot.c
Go to the documentation of this file.
00001 /* applies a plane rotation
00002    May,23,1988             */
00003 
00004 #include "arith.h"
00005 
00006 srot(n,sx,isx,jsx,incx,sy,isy,jsy,incy,c,s)
00007 MATRIX sx,sy;
00008 REAL c,s;
00009 int n,incx,incy,isx,jsx,isy,jsy;
00010 {
00011     REAL stemp;
00012     int i,ix,iy;
00013 
00014     if(n <= 0)
00015         return;
00016 
00017     if((incx != 1) || (incy != 1)){
00018 
00019         /* code for unequal increments or equal increments
00020            not equal to 1 */
00021 /*
00022         ix=1;
00023         iy=1;
00024         if(incx < 0)
00025             ix= (-n+1)*incx+1;
00026         if(incy < 0)
00027             iy= (-n+1)*incy+1;
00028         for(i=1; i<=n; i++){
00029             stemp= c*sx[ix]+s*sy[iy];
00030             sy[iy]= c*sy[iy]-s*sx[ix];
00031             sx[ix]= stemp;
00032             ix= ix+incx;
00033             iy= iy+incy;
00034         }
00035 */
00036         return;
00037     }
00038 
00039 /* code for both increments equal to 1 */
00040 
00041     for(i=0; i<n; i++){
00042         stemp= c*sx[isx+i][jsx]+s*sy[isy+i][jsy];
00043         sy[isy+i][jsy]= c*sy[isy+i][jsy]-s*sx[isx+i][jsx];
00044         sx[isx+i][jsx]=stemp;
00045     }
00046 
00047     return;
00048 }
00049 
00050 
00051 


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 6 2019 18:05:53