summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
diff options
context:
space:
mode:
authorSiddhu89902017-07-04 19:58:16 +0530
committerSiddhu89902017-07-04 19:58:16 +0530
commit0de1d810a20afa0d8a76cecca8d651e7696a86b6 (patch)
tree0063bfdcb730f75e8cd4281d6f775791883c87d4 /2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
parentc66867c874436fb37ef54c67b048885ce094e894 (diff)
parent46f9a6c3b848a549f5d92929fd6d1efb501e176a (diff)
downloadScilab2C-0de1d810a20afa0d8a76cecca8d651e7696a86b6.tar.gz
Scilab2C-0de1d810a20afa0d8a76cecca8d651e7696a86b6.tar.bz2
Scilab2C-0de1d810a20afa0d8a76cecca8d651e7696a86b6.zip
Merge branch 'Ankitr19-master'
Merged with Ankit's work. Added new functions (amell)
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c')
-rw-r--r--2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c b/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
index ad7d095b..1f6cf9ba 100644
--- a/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
+++ b/2.3-1/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
@@ -14,18 +14,22 @@
#include "sinc.h"
#include "sin.h"
#include "doubleComplex.h"
+#include "division.h"
void zsinca(doubleComplex* sample,int size,doubleComplex* oup)
{
int j;
+ double r,i;
for(j=0;j<size;j++)
{
- if(sample[j]==0)
+ r=zreals(sample[j]);
+ i=zimags(sample[j]);
+ if(r==0 && i==0)
{
- oup[j]==DoubleComplex(1,0);
+ oup[j]=DoubleComplex(1,0);
}
else
{
- oup[j]=zsins(sample[j])/sample[j];
+ oup[j]=zrdivs(zsins(sample[j]),sample[j]);
}
}
}